Datasheet
Strstr
Strcspn
Strpbrk
Strrchr
558
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
char *strstr(char *s1, char *s2);
Description
Function locates the first occurrence of the string s2 in the string s1 (excluding
the terminating null character).
The function returns pointer to first occurrence of s2 in s1; if no string was
found, function returns 0. If s2 is a null string, the function returns 0.
Prototype
char *strcspn(char * s1, char *s2);
Description
Function computes the length of the maximum initial segment of the string point-
ed to by
s1 that consists entirely of characters that are not in the string pointed
to by
s2.
The function returns the length of the initial segment.
Prototype
char *strpbrk(char * s1, char *s2);
Description
Function searches s1 for the first occurrence of any character from the string s2.
The terminating null character is not included in the search. The function returns
pointer to the matching character in s1. If s1 contains no characters from s2, the
function returns 0.
Prototype
char *strrchr(char * ptr, unsigned int chr);
Description
Function searches the string ptr for the last occurrence of character chr. The
null character terminating ptr is not included in the search. The function returns
pointer to the last chr found in ptr; if no matching character was found, function
returns 0.