|
|
@ -1,4 +1,4 @@ |
|
|
|
.\" $OpenBSD: strsep.3,v 1.4 1998/06/15 17:55:14 mickey Exp $ |
|
|
|
.\" $OpenBSD: strsep.3,v 1.5 1999/06/04 19:14:56 aaron Exp $ |
|
|
|
.\" |
|
|
|
.\" Copyright (c) 1990, 1991, 1993 |
|
|
|
.\" The Regents of the University of California. All rights reserved. |
|
|
@ -58,13 +58,17 @@ the first occurrence of any character in the string |
|
|
|
character) and replaces it with a |
|
|
|
.Ql \e0 . |
|
|
|
The location of the next character after the delimiter character |
|
|
|
(or NULL, if the end of the string was reached) is stored in |
|
|
|
(or |
|
|
|
.Dv NULL , |
|
|
|
if the end of the string was reached) is stored in |
|
|
|
.Fa *stringp . |
|
|
|
The original value of |
|
|
|
.Fa *stringp |
|
|
|
is returned. |
|
|
|
.Pp |
|
|
|
An ``empty'' field, i.e. one caused by two adjacent delimiter characters, |
|
|
|
An |
|
|
|
.Dq empty |
|
|
|
field, i.e., one caused by two adjacent delimiter characters, |
|
|
|
can be detected by comparing the location referenced by the pointer returned |
|
|
|
in |
|
|
|
.Fa *stringp |
|
|
@ -101,7 +105,7 @@ While the |
|
|
|
.Fn strtok |
|
|
|
function should be preferred for portability reasons (it conforms to |
|
|
|
.St -ansiC ) |
|
|
|
it is unable to handle empty fields, i.e. detect fields delimited by |
|
|
|
it is unable to handle empty fields, i.e., detect fields delimited by |
|
|
|
two adjacent delimiter characters, or to be used for more than a single |
|
|
|
string at a time. |
|
|
|
The |
|
|
|