Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a reverse function for strstr

Tags:

People also ask

What is the return of Strstr?

Return Value The strstr() function returns a pointer to the beginning of the first occurrence of string2 in string1. If string2 does not appear in string1, the strstr() function returns NULL. If string2 points to a string with zero length, the strstr() function returns string1.

What does Strstr return if failed?

Return value The strstr() function returns the part of the input string searched for, or false if it fails to find the searched string.

What type of function is Strstr?

strstr() in C/C++ In C++, std::strstr() is a predefined function used for string handling. string. h is the header file required for string functions. This function takes two strings s1 and s2 as an argument and finds the first occurrence of the sub-string s2 in the string s1.

Is Strstr case sensitive in C?

It's a cousin to the standard C library string comparison function, strstr(). The word case sandwiched inside means that the strings are compared in a case-insensitive way. Otherwise, both functions are identical.


I am trying to find a similar function to strstr that searches a substring starting from the end towards the beginning of the string.