The C programming language has a set of functions implementing operations on strings in its standard library string.h. Operations such as concatenations, copying, tokenization and sub-string search is supported.
Function | Description |
---|---|
strcat | Concatenates two string |
strncat | Appends not more than n characters of a string into another string |
strcpy | Copies one string into another string |
strncpy | Copies n characters of a string into another string |
strcmp | Compares two string. If the first string is lexographically less than the second, a value less than zero is returned. If the first is lexographically greater than the second, a value greater than zero is returned. And zero if the two strings are equal. |
strlen | Finds the length of the string (not considering the null byte) |
strchr | Returns a pointer to the first occurrence of a character in a string |
strrchr | Returns a pointer to the last occurrence of a character in a string |
strstr | Returns a pointer to the first occurrence of a string in a string |
strrev | Reverses the string |
strupr | Converts lowercase string to uppercase |
strlwr | Converts uppercase string to lowercase |
C Programming
Overview Hello World Installation Comments Header Files Data Types Tokens Operators Input/Output Format Specifiers Decision Control Loops Type Qualifiers Storage class specifier Arrays Enums Structures Unions Functions Recursions Inline Functions Pointers Pointer Arithematic Call by value and call by reference Linked Lists Passing of Arrays in Functions Preprocessor and Macros Mathematical Operations String Operations Bit Fields Command Line Arguments Variable Arguments Error Handling Type Casting Typedef File Handling Multi Processing Threads Outdated C Programming Memory Management Compilation C Programs Interview Questions MiscellaneousTrending
C Programming
Remember to follow community guidelines and don't go off topic.