Print this page
9842 man page typos and spelling


 341 .SS "\fBstpcpy()\fR, \fBstpncpy()\fR"
 342 .LP
 343 The \fBstpcpy()\fR and \fBstpncpy()\fR functions behave identically to
 344 \fBstrcpy()\fR and \fBstrncpy()\fR respectively; however, instead of returning a
 345 pointer to the beginning of \fIs1\fR, they return a pointer to the terminating
 346 null character.
 347 .SS "\fBstrcspn()\fR, \fBstrspn()\fR"
 348 .LP
 349 The \fBstrcspn()\fR function returns the length of the initial segment of
 350 string \fIs1\fR that consists entirely of characters not from string \fIs2\fR.
 351 The \fBstrspn()\fR function returns the length of the initial segment of string
 352 \fIs1\fR that consists entirely of characters from string \fIs2\fR.
 353 .SS "\fBstrdup()\fR, \fBstrndup()\fR, \fBstrdupa()\fR, \fBstrndupa()\fR"
 354 .LP
 355 The \fBstrdup()\fR function returns a pointer to a new string that is a
 356 duplicate of the string pointed to by  \fIs1\fR. The returned pointer can be
 357 passed to \fBfree()\fR. The space for the new string is obtained using
 358 \fBmalloc\fR(3C). If the new string cannot be created, a null pointer is
 359 returned and \fBerrno\fR may be set to \fBENOMEM\fR to indicate that the
 360 storage space available is insufficient. The \fBstrndup()\fR function is
 361 identical to \fBstrdup()\fR, execept it copies at most \fIn\fR bytes from
 362 \fBs1\fR and ensures the copied string is awlays null terminated.
 363 .LP
 364 The functions \fBstrdupa()\fR and \fBstrndupa()\fR behave identically to
 365 \fBstrdup()\fR and \fBstrndup()\fR respectively; however, instead of allocating
 366 memory using \fBmalloc\fR(3C), they use \fBalloca\fR(3C). These functions are
 367 provided for compatibility only, their use is strongly discouraged due to their
 368 use of \fBalloca\fR(3C).
 369 .SS "\fBstrlen()\fR, \fBstrnlen()\fR"
 370 The \fBstrlen()\fR function returns the number of bytes in \fIs\fR, not
 371 including the terminating null character.
 372 .LP
 373 The \fBstrnlen()\fR function returns the smaller of \fIn\fR or the number of
 374 bytes in \fIs\fR, not including the terminating null character. The
 375 \fBstrnlen()\fR function never examines more than \fIn\fR bytes of the string
 376 pointed to by \fIs\fR.
 377 .SS "\fBstrpbrk()\fR"
 378 .LP
 379 The \fBstrpbrk()\fR function returns a pointer to the first occurrence in
 380 string \fIs1\fR of any character from string \fIs2\fR, or a null pointer if no
 381 character from \fIs2\fR exists in \fIs1\fR.
 382 .SS "\fBstrsep()\fR"




 341 .SS "\fBstpcpy()\fR, \fBstpncpy()\fR"
 342 .LP
 343 The \fBstpcpy()\fR and \fBstpncpy()\fR functions behave identically to
 344 \fBstrcpy()\fR and \fBstrncpy()\fR respectively; however, instead of returning a
 345 pointer to the beginning of \fIs1\fR, they return a pointer to the terminating
 346 null character.
 347 .SS "\fBstrcspn()\fR, \fBstrspn()\fR"
 348 .LP
 349 The \fBstrcspn()\fR function returns the length of the initial segment of
 350 string \fIs1\fR that consists entirely of characters not from string \fIs2\fR.
 351 The \fBstrspn()\fR function returns the length of the initial segment of string
 352 \fIs1\fR that consists entirely of characters from string \fIs2\fR.
 353 .SS "\fBstrdup()\fR, \fBstrndup()\fR, \fBstrdupa()\fR, \fBstrndupa()\fR"
 354 .LP
 355 The \fBstrdup()\fR function returns a pointer to a new string that is a
 356 duplicate of the string pointed to by  \fIs1\fR. The returned pointer can be
 357 passed to \fBfree()\fR. The space for the new string is obtained using
 358 \fBmalloc\fR(3C). If the new string cannot be created, a null pointer is
 359 returned and \fBerrno\fR may be set to \fBENOMEM\fR to indicate that the
 360 storage space available is insufficient. The \fBstrndup()\fR function is
 361 identical to \fBstrdup()\fR, except it copies at most \fIn\fR bytes from
 362 \fBs1\fR and ensures the copied string is always null terminated.
 363 .LP
 364 The functions \fBstrdupa()\fR and \fBstrndupa()\fR behave identically to
 365 \fBstrdup()\fR and \fBstrndup()\fR respectively; however, instead of allocating
 366 memory using \fBmalloc\fR(3C), they use \fBalloca\fR(3C). These functions are
 367 provided for compatibility only, their use is strongly discouraged due to their
 368 use of \fBalloca\fR(3C).
 369 .SS "\fBstrlen()\fR, \fBstrnlen()\fR"
 370 The \fBstrlen()\fR function returns the number of bytes in \fIs\fR, not
 371 including the terminating null character.
 372 .LP
 373 The \fBstrnlen()\fR function returns the smaller of \fIn\fR or the number of
 374 bytes in \fIs\fR, not including the terminating null character. The
 375 \fBstrnlen()\fR function never examines more than \fIn\fR bytes of the string
 376 pointed to by \fIs\fR.
 377 .SS "\fBstrpbrk()\fR"
 378 .LP
 379 The \fBstrpbrk()\fR function returns a pointer to the first occurrence in
 380 string \fIs1\fR of any character from string \fIs2\fR, or a null pointer if no
 381 character from \fIs2\fR exists in \fIs1\fR.
 382 .SS "\fBstrsep()\fR"