In this article, you will learn how to write a C program to search a substring in a given string. Program to check if substring… [Read More]
C strlen() Function – C tutorial
The function strlen() returns the length (number of characters) of the given string. Function strlen() Declaration size_t strlen(const char *str) str – This is the… [Read More]
C strcspn() Function – C tutorial
The strcspn() function scans the main string for the given string and returns the number of characters in the main string from beginning till the… [Read More]
C strstr() Function – C tutorial
The strstr() function searches the given string in the specified main string and returns the pointer to the first occurrence of the given string. C… [Read More]
C strspn() Function
The function strspn() searches specified string in the given string and returns the number of the characters that are matched in the given string. C… [Read More]
C strrchr() Function – C tutorial
The strrchr() function searches the last occurrence of the specified character in the given string. This function works quite opposite to the function strchr() which… [Read More]
C strncpy() Function – C tutorial
The strncpy() function is similar to the strcpy() function, except that it copies only the specified number of characters from source string to destination string…. [Read More]
C strcpy() Function – C tutorial
The strcpy() function copies one string to another string. C strcpy() function declaration char *strcpy(char *str1, const char *str2) str1 – This is the destination… [Read More]
C strcoll() Function – C tutorial
The strcoll() function is similar to strcmp() function, it compares two strings and returns an integer number based on the result of comparison. C strcoll()… [Read More]
C strncmp() Function with example
In the last tutorial we discussed strcmp() function which is used for comparing two strings. In this guide, we will discuss strncmp() function which is… [Read More]
C strcmp() Function with example
The strcmp() function compares two strings and returns an integer value based on the result. C strcmp() function declaration int strcmp(const char *str1, const char… [Read More]
C strchr() Function with example
The function strchr() searches the occurrence of a specified character in the given string and returns the pointer to it. C strchr() Function char *strchr(const… [Read More]
C strncat() Function with example
In the last tutorial we discussed strcat() function, which is used for concatenation of one string to another string. In this guide, we will see… [Read More]
C strcat() Function with example
The strcat() function is used for string concatenation. It concatenates the specified string at the end of the another specified string. In this tutorial, we… [Read More]