String function in C programming Language
- Home
- function in C
- String function in C programming Language
- On
- By
- 0 Comment
- Categories: function in C, Pre-define String function in C
String function in C programming Language
String function in C programming Language
String function in C programming language is used to perform related operations of strings, which are always enclosed by double quotes. The character is enclosed by single quotes in c similar to other languages.
In this tutorial, we will learn about every function in the C programming Language
strcat() – It is a Concatenates two string, Str2 can be concatenated at the end of the str1
strncat() – It is Appends a portion of String to another
strcpy() – It Copies String2 into String 1
strncpy() – It Copies the given number of characters of one String to another
strlen() – It gives the length of given String
strcmp() – It Returns 0 value if String 1 is same as String 2.
Returns < 0 ,if String 1<String 2.
Returns >0 if String1>String2
strcmpi() – It is the same as strcmp() function but this function negotiates case “A” and “a” are treated as same
strchr() – It is a which returns the pointer to the first occurrence of char in String 1
strrchr() – the Last occurrence of a given character in a String is found
strstr() – It Returns a pointer to the first occurrence of String 2 in String 1
strrstr() -It Returns a pointer to the last occurrence of String 2 in String 1
strdup() – It is a function in C language which Duplicates the given String
strlwr() – It is a C language function which Converts string to lover case
strupr() – It Converts string to upper case
strrev() – It Reverses the given string
strset() – It Sets all characters in a string to given character
strnset() – It sets the portion of characters in a string to given character
strtok() – It is Tokenizing has given String using delimiter
Suggested for you