String routines in c, C/C++ Programming

Available in the string.h header file are the following routines  
   
  strcat(string1,string2);
 
This joins string2 to string1; care must be taken to allocate enough space for the answer 
 
  strchr(string,character);
 
This locates the position of the first occurrence of the character within the string and returns the address of that character i.e. a Find 
 
  strcmp(string1,string2);
 
This compares string2 to string1, if no difference if found a NULL character is returned else the address of the first non matching character.
 
  strcpy(string1,string2);
 
The copies the string2 into string1
 
  strlen(string);
 
Returns the length of the string 
 
  isalpha(character);
 
Returns a non-zero number if the character is a letter, otherwise a zero is returned
 
  isupper(character);
 
Returns a non-zero number if the character is uppercase, otherwise a zero is returned
 
  islower(character);
 
Returns a non-zero number if the character is lower case, otherwise a zero is returned
 
  isdigit(character);
 
Returns a non-zero number if the character is a digit i.e. 0-9, otherwise a zero is returned
 
  toupper(character);
 
Returns the upper case version of the character 
 
  tolower (character);
 
Returns the lower case version of the character

Posted Date: 4/16/2013 12:48:25 AM | Location : United States







Related Discussions:- String routines in c, Assignment Help, Ask Question on String routines in c, Get Answer, Expert's Help, String routines in c Discussions

Write discussion on String routines in c
Your posts are moderated
Related Questions
Do you have any solution on this activity?

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

A: In C, encapsulation was completed by making things static in a compilation unit or module. It prevented another module from accessing the static stuff. (Incidentally, now static

Described the order that objects in an array is destructed?

# Dear I want help to programmer that write C++ code for my small project as soon as posible If we can help me?..

Need help in network programming in C++ project. How much you charge?

A: Provide a friend operator class Base { public: friend std::ostream& operator ... protected: virtual void printOn(std::ostream& o) const; }; inline std::ostr

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

C++ improves on many of C's features and provides object-oriented programming capabilities used for software production, quality and reusability. C++ was developed by Bjarne Strons

We have used logic symbols in the past, but not really though about the actual real devices. Semiconductor companies have taken the logic symbols are manufactured them into logic f