summaryrefslogtreecommitdiff
path: root/src/lib/libc/string/wcstok.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/string/wcstok.3')
-rw-r--r--src/lib/libc/string/wcstok.325
1 files changed, 20 insertions, 5 deletions
diff --git a/src/lib/libc/string/wcstok.3 b/src/lib/libc/string/wcstok.3
index 945ec9b990..33ba1318a1 100644
--- a/src/lib/libc/string/wcstok.3
+++ b/src/lib/libc/string/wcstok.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: wcstok.3,v 1.6 2010/09/10 18:38:20 jmc Exp $ 1.\" $OpenBSD: wcstok.3,v 1.7 2011/07/25 00:38:53 schwarze Exp $
2.\" 2.\"
3.\" $NetBSD: wcstok.3,v 1.3 2003/09/08 17:54:33 wiz Exp $ 3.\" $NetBSD: wcstok.3,v 1.3 2003/09/08 17:54:33 wiz Exp $
4.\" 4.\"
@@ -54,7 +54,7 @@
54.\" Original version ID: 54.\" Original version ID:
55.\" FreeBSD: src/lib/libc/string/wcstok.3,v 1.4 2002/10/15 09:49:54 tjr Exp 55.\" FreeBSD: src/lib/libc/string/wcstok.3,v 1.4 2002/10/15 09:49:54 tjr Exp
56.\" 56.\"
57.Dd $Mdocdate: September 10 2010 $ 57.Dd $Mdocdate: July 25 2011 $
58.Dt WCSTOK 3 58.Dt WCSTOK 3
59.Os 59.Os
60.Sh NAME 60.Sh NAME
@@ -90,8 +90,14 @@ must be provided on each call.
90The 90The
91.Fn wcstok 91.Fn wcstok
92function is the wide-character counterpart of the 92function is the wide-character counterpart of the
93.Fn strtok_r 93.Xr strtok_r 3
94function. 94function.
95.Pp
96Since
97.Fn wcstok
98modifies the string,
99.Fa str
100should not point to an area in the initialized data segment.
95.Sh RETURN VALUES 101.Sh RETURN VALUES
96The 102The
97.Fn wcstok 103.Fn wcstok
@@ -118,7 +124,9 @@ for (tok = wcstok(text, seps, &last); tok != NULL;
118.Xr wcscspn 3 , 124.Xr wcscspn 3 ,
119.Xr wcspbrk 3 , 125.Xr wcspbrk 3 ,
120.Xr wcsrchr 3 , 126.Xr wcsrchr 3 ,
121.Xr wcsspn 3 127.Xr wcsspn 3 ,
128.Xr wcsstr 3 ,
129.Xr wmemchr 3
122.Sh STANDARDS 130.Sh STANDARDS
123The 131The
124.Fn wcstok 132.Fn wcstok
@@ -126,11 +134,18 @@ function
126conforms to 134conforms to
127.St -isoC-99 . 135.St -isoC-99 .
128.Sh HISTORY 136.Sh HISTORY
137The
138.Fn wcstok
139function was ported from
140.Nx
141and first appeared in
142.Ox 3.8 .
143.Pp
129Some early implementations of 144Some early implementations of
130.Fn wcstok 145.Fn wcstok
131omit the 146omit the
132context pointer argument, 147context pointer argument,
133.Fa last , 148.Fa last ,
134and maintain state across calls in a static variable like 149and maintain state across calls in a static variable like
135.Fn strtok 150.Xr strtok 3
136does. 151does.