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

log function in C programming language
strlen string function in C programming language
Karmehavannan

I am Mr S.Karmehavannan. Founder and CEO of this website. This website specially designed for the programming learners and very especially programming beginners, this website will gradually lead the learners to develop their programming skill.

Recent Posts

How to find reverse number using method in Java

How to find reverse number using method In this article, we will discuss the concept…

8 hours ago

C# inverted full pyramid star pattern

C# inverted full pyramid star pattern In this article, we will discuss the concept of…

3 weeks ago

C# Full Pyramid star pattern program

C# Full Pyramid star pattern program In this article, we will discuss the concept of…

1 month ago

Program to count vowels,consonants,words, characters and space in Java

Program to count vowels, consonants, words, characters and space in Java In this article, we…

1 month ago

How to print multiplication table using Array in C++ language

How to print multiplication table using Array in C++ language In this post, we will…

1 month ago

C Program to multiplication table using Array

C Program to multiplication table using Array In this tutorial , we will discuss about…

2 months ago