Penguin
Annotated edit history of strsep(3) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 STRSEP
2 !!!STRSEP
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 RETURN VALUE
7 NOTES
8 BUGS
9 CONFORMING TO
10 SEE ALSO
11 ----
12 !!NAME
13
14
15 strsep - extract token from string
16 !!SYNOPSIS
17
18
19 __#include
20 __''stringp''__, const char *__''delim''__);
21 __
22 !!DESCRIPTION
23
24
25 If *''stringp'' is NULL, the __strsep()__ function
26 returns NULL and does nothing else. Otherwise, this function
27 finds the first token in the string *''stringp'', where
28 tokens are delimited by symbols in the string ''delim''.
29 This token is terminated with a `0' character (by
30 overwriting the delimiter) and *''stringp'' is updated to
31 point past the token. In case no delimiter was found, the
32 token is taken to be the entire string *''stringp'', and
33 *''stringp'' is made NULL.
34 !!RETURN VALUE
35
36
37 The __strsep()__ function returns a pointer to the token,
38 that is, it returns the original value of
39 *''stringp''.
40 !!NOTES
41
42
43 The __strsep()__ function was introduced as a replacement
44 for __strtok()__, since the latter cannot handle empty
45 fields. However, __strtok()__ conforms to ANSI-C and
46 hence is more portable.
47 !!BUGS
48
49
50 This function suffers from the same problems as
51 __strtok()__. In particular, it modifies the original
52 string. Avoid it.
53 !!CONFORMING TO
54
55
56 BSD 4.4
57 !!SEE ALSO
58
59
60 index(3), memchr(3), rindex(3),
61 strchr(3), strpbrk(3), strspn(3),
62 strstr(3), strtok(3)
63 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.