C - String Functions
Arrays and Strings in Tamil
C - String Functions
- In C- Programming some inbuilt functions are available for manipulating the string.
- Some of the string functions are listed below as follows :
strcat ( )
- In C-Programming the strcat() function is used for concatenating two given strings.
- It concatenates source string at the end of destination string.
C Syntax
strncat ( )
- In C-Programming the strncat() function is used for concatenating ( appending ) portion of one string at the end of another string.
C Syntax
strcpy ( )
- In C-Programming the strcpy() function is used for copying contents of one string into another string.
C Syntax
strncpy ( )
- In C-Programming the strncpy() function is used for copying the portion of contents of one string into another string.
C Syntax
strlen ( )
- In C-Programming the strlen() function is used for finding the length of the string.
C Syntax
strcmp ( )
- In C-Programming the strcmp( ) function is used for comparing two given strings and returns zero if they are same..
C Syntax
strcmpi ( )
- In C-Programming the strcmpi( ) function is used for comparing two given strings.
- But, strcmpi( ) function is not case sensitive. i.e, “A” and “a” are treated as same characters.
C Syntax
strchr ( )
- In C-Programming the strchr( ) function is used for defining the returns pointer to the first occurrence of the character in a given string.
C Syntax
strstr ( )
- In C-Programming the strstr( )function is used for return pointer to the first occurrence of the string in a given string.
C Syntax
strrstr ( )
- In C-Programming the strrstr( )function is used for return pointer to the last occurrence of the string in a given string.
C Syntax
strdup ( )
- In C-Programming the strdup( )function is used for creating a duplicated string.
C Syntax
strlwr ( )
- In C-Programming the strlwr( )function is used for converting the given string into lowercase.
C Syntax
strupr ( )
- In c-Programming the strupr( )function is used for converting the given string into Uppercase
C Syntax
strrev ( )
- In C-Programming the strrev( )function is used for converting the given string into reverse order.
C Syntax
strset ( )
- In C-Programming the strset( )function is used for setting all the characters in a string to given character.
C Syntax
strnset ( )
- In C-Programming the strset( )function is used for setting the portion of characters in a string to given character.
C Syntax
strtok ( )
- In C-Programming the strset( )function is used for tokenizes/parses the given string using delimiter.