Datasheet
strcat
strchr
strcmp
strcpy
strlen
556
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
char *strcat(char *to, char *from);
Description
Function appends a copy of the string from to the string to, overwriting the null
character at the end of to. Then, a terminating null character is added to the
result. If copying takes place between objects that overlap, the behavior is unde-
fined.
to string must have enough space to store the result. The function returns
address of the object pointed to by
to.
Prototype
char *strchr(char *ptr, char chr);
Description
Function locates the first occurrence of character chr in the string ptr. The
function returns a pointer to the first occurrence of character chr, or a null point-
er if chr does not occur in ptr. The terminating null character is considered to
be a part of the string.
Prototype
int strcmp(char *s1, char *s2);
Description
Function compares strings s1 and s2 and returns zero if the strings are equal,
or returns a difference between the first differing characters (in a left-to-right
evaluation). Accordingly, the result is greater than zero if s1 is greater than s2
and vice versa.
Prototype
char *strcpy(char *to, char *from);
Description
Function copies the string from into the string to. If copying is successful, the
function returns to. If copying takes place between objects that overlap, the
behavior is undefined.
Prototype
int strlen(char *s);
Description
Function returns the length of the string s (the terminating null character does
not count against string’s length).