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

PHP Star Triangle pattern program

PHP Star Triangle pattern program In this tutorial, we will discuss about PHP Star Triangle…

1 month ago

PHP Full Pyramid pattern program

PHP Full Pyramid pattern program In this tutorial, we will discuss about PHP Full Pyramid…

2 months ago

5 methods to add two numbers in Java

5 methods to add two numbers in Java In this tutorial, we will discuss the…

2 months ago

Python Full Pyramid star pattern program

Python full Pyramid star pattern program In this tutorial, we will discuss  the concept of…

5 months ago

Write a function or method to convert C into F -Entered by user

Write a function or method to convert C into F -Entered by the user In…

10 months ago

How to write a function or method to convert Celsius into Fahrenheit

How to write a function or method to convert Celsius into Fahrenheit In this tutorial,…

10 months ago