3 strcat, strncat, strcmp, strncmp, cistrcmp, cistrncmp, strcpy, strncpy, strecpy, strlen, strchr, strrchr, strpbrk, strspn, strcspn, strtok, strdup, strstr, cistrstr \- string operations
11 char* strcat(char *s1, char *s2)
14 char* strncat(char *s1, char *s2, long n)
17 int strcmp(char *s1, char *s2)
20 int strncmp(char *s1, char *s2, long n)
23 int cistrcmp(char *s1, char *s2)
26 int cistrncmp(char *s1, char *s2, int n)
29 char* strcpy(char *s1, char *s2)
32 char* strecpy(char *s1, char *es1, char *s2)
35 char* strncpy(char *s1, char *s2, long n)
41 char* strchr(char *s, int c)
44 char* strrchr(char *s, int c)
47 char* strpbrk(char *s1, char *s2)
50 long strspn(char *s1, char *s2)
53 long strcspn(char *s1, char *s2)
56 char* strtok(char *s1, char *s2)
62 char* strstr(char *s1, char *s2)
65 char* cistrstr(char *s1, char *s2)
71 point to null-terminated strings.
84 do not check for overflow of
85 the array pointed to by
89 appends a copy of string
97 Each returns a pointer to the null-terminated result.
100 compares its arguments and returns an integer
101 less than, equal to, or greater than 0,
104 is lexicographically less than, equal to, or
108 makes the same comparison but examines at most
114 ignore ASCII case distinctions when comparing strings.
115 The comparisons are made with unsigned bytes.
122 stopping after the null byte has been copied.
133 The result will not be null-terminated if the length
139 Each function returns
143 copies bytes until a null byte has been copied, but writes no bytes beyond
145 If any bytes are copied,
147 is terminated by a null byte, and a pointer to that byte is returned.
148 Otherwise, the original
153 returns the number of bytes in
155 not including the terminating null byte.
159 returns a pointer to the first (last)
166 does not occur in the string.
167 The null byte terminating a string is considered to
168 be part of the string.
171 returns a pointer to the first occurrence in string
173 of any byte from string
182 returns the length of the initial segment of string
184 which consists entirely of bytes from (not from) string
190 to consist of a sequence of zero or more text tokens separated
191 by spans of one or more bytes from the separator string
193 The first call, with pointer
195 specified, returns a pointer to the first byte of the first
196 token, and will have written a
199 immediately following the returned token.
201 keeps track of its position in the string
202 between separate calls; subsequent calls,
205 being nil, will work through the string
207 immediately following that token.
210 may be different from call to call.
211 When no token remains in
216 returns a pointer to a distinct copy of the null-terminated string
218 in space obtained from
220 or nil if no space can be obtained.
223 returns a pointer to the first occurrence of
227 or nil if there is none.
235 operates analogously, but ignores ASCII case differences when comparing strings.
237 All these routines have portable C implementations in
238 .BR /sys/src/libc/port .
239 Many also have machine-dependent assembly language
241 .BR /sys/src/libc/$objtype .
248 These routines know nothing about
253 Note, however, that the definition of
261 The outcome of overlapping moves varies among implementations.