Character Array Functions

strlen (st): find the length of the string

strcmp (s1, s2): string comparison lexicographic ordering size comparison. (S1 if large dictionary code, returns a positive number; return 0 if the dictionary codes are equal; if s2 code dictionary returns a negative large)

strncmp (s1, s2, n): the first n s1, s2 compared

strcat (s1, s2) connected to the back of the s1 and s2, doctrine, have sufficient storage space s1

strncat (s1, s2, n) the first n characters of s1 s2 is connected to the rear

strcpy (s1, s2) to copy the contents of s2 s1, s1 of substitute content.

strncpy (s1, s2) the first n characters of the copy to s2 s1, s1 of substitute content.

 

Guess you like

Origin www.cnblogs.com/echo-kid-coding/p/11445765.html