1. There are two string comparison functions, namely memcmp () and strcmp (),
MEMCMP (const char *s,const char *d,int N)
Indicates that the string s and D compare the first n characters, and if the character length is less than N, the comparison is out of bounds, so use this function with special care for S and d in length and the number of characters to compare.
strcmp (const char *s,const char *d)
A parameter n is less than the last function, because this function is marked as '% ', if a string reaches the position of ' \ ', the comparison is ended, and note that the two string s and d lengths must be equal to match, and if the lengths are unequal, they do not return 0.
2. There are also two string copy functions, memcpy () and strcpy (), respectively, with the following prototypes:
memcpy (char *d,char *s,int N)
Indicates that the n characters in s are copied into the D array, paying particular attention to the problem of array out-of-bounds, to ensure that D is sufficient to write and N to read N.
strcpy (char *d,char *s)
The parameter is less than one n, because it is a copy end tag with ' \ n ', to copy S to D until S reaches the position of ' \ ', the problem is that D is not less than the length of S.
3. String concatenation function commonly used strcat (), today used a bit, the prototype is as follows:
strcat (char *d,const char *s)
Indicates that the S is stitched to the back of D, and the "s" position of D is used as the symbol to start copying the past, to ensure that D can tolerate the length of the d+s.
Notes C-language string comparison functions, copy functions and splicing functions