diff options
Diffstat (limited to 'lib/libc/string/wcstok.3')
-rw-r--r-- | lib/libc/string/wcstok.3 | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/lib/libc/string/wcstok.3 b/lib/libc/string/wcstok.3 index 945ec9b990e..33ba1318a12 100644 --- a/lib/libc/string/wcstok.3 +++ b/lib/libc/string/wcstok.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: wcstok.3,v 1.6 2010/09/10 18:38:20 jmc Exp $ +.\" $OpenBSD: wcstok.3,v 1.7 2011/07/25 00:38:53 schwarze Exp $ .\" .\" $NetBSD: wcstok.3,v 1.3 2003/09/08 17:54:33 wiz Exp $ .\" @@ -54,7 +54,7 @@ .\" Original version ID: .\" FreeBSD: src/lib/libc/string/wcstok.3,v 1.4 2002/10/15 09:49:54 tjr Exp .\" -.Dd $Mdocdate: September 10 2010 $ +.Dd $Mdocdate: July 25 2011 $ .Dt WCSTOK 3 .Os .Sh NAME @@ -90,8 +90,14 @@ must be provided on each call. The .Fn wcstok function is the wide-character counterpart of the -.Fn strtok_r +.Xr strtok_r 3 function. +.Pp +Since +.Fn wcstok +modifies the string, +.Fa str +should not point to an area in the initialized data segment. .Sh RETURN VALUES The .Fn wcstok @@ -118,7 +124,9 @@ for (tok = wcstok(text, seps, &last); tok != NULL; .Xr wcscspn 3 , .Xr wcspbrk 3 , .Xr wcsrchr 3 , -.Xr wcsspn 3 +.Xr wcsspn 3 , +.Xr wcsstr 3 , +.Xr wmemchr 3 .Sh STANDARDS The .Fn wcstok @@ -126,11 +134,18 @@ function conforms to .St -isoC-99 . .Sh HISTORY +The +.Fn wcstok +function was ported from +.Nx +and first appeared in +.Ox 3.8 . +.Pp Some early implementations of .Fn wcstok omit the context pointer argument, .Fa last , and maintain state across calls in a static variable like -.Fn strtok +.Xr strtok 3 does. |