summaryrefslogtreecommitdiff
path: root/src/lib/libc/string/strsep.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/string/strsep.3')
-rw-r--r--src/lib/libc/string/strsep.312
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/libc/string/strsep.3 b/src/lib/libc/string/strsep.3
index 5af262a074..dfd835bce8 100644
--- a/src/lib/libc/string/strsep.3
+++ b/src/lib/libc/string/strsep.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: strsep.3,v 1.4 1998/06/15 17:55:14 mickey Exp $ 1.\" $OpenBSD: strsep.3,v 1.5 1999/06/04 19:14:56 aaron Exp $
2.\" 2.\"
3.\" Copyright (c) 1990, 1991, 1993 3.\" Copyright (c) 1990, 1991, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
@@ -58,13 +58,17 @@ the first occurrence of any character in the string
58character) and replaces it with a 58character) and replaces it with a
59.Ql \e0 . 59.Ql \e0 .
60The location of the next character after the delimiter character 60The location of the next character after the delimiter character
61(or NULL, if the end of the string was reached) is stored in 61(or
62.Dv NULL ,
63if the end of the string was reached) is stored in
62.Fa *stringp . 64.Fa *stringp .
63The original value of 65The original value of
64.Fa *stringp 66.Fa *stringp
65is returned. 67is returned.
66.Pp 68.Pp
67An ``empty'' field, i.e. one caused by two adjacent delimiter characters, 69An
70.Dq empty
71field, i.e., one caused by two adjacent delimiter characters,
68can be detected by comparing the location referenced by the pointer returned 72can be detected by comparing the location referenced by the pointer returned
69in 73in
70.Fa *stringp 74.Fa *stringp
@@ -101,7 +105,7 @@ While the
101.Fn strtok 105.Fn strtok
102function should be preferred for portability reasons (it conforms to 106function should be preferred for portability reasons (it conforms to
103.St -ansiC ) 107.St -ansiC )
104it is unable to handle empty fields, i.e. detect fields delimited by 108it is unable to handle empty fields, i.e., detect fields delimited by
105two adjacent delimiter characters, or to be used for more than a single 109two adjacent delimiter characters, or to be used for more than a single
106string at a time. 110string at a time.
107The 111The