7 /* trivial token splitter
9 /* #include <split_at.h>
11 /* char *split_at(string, delimiter)
15 /* char *split_at_right(string, delimiter)
19 /* split_at() null-terminates the \fIstring\fR at the first
20 /* occurrence of the \fIdelimiter\fR character found, and
21 /* returns a pointer to the remainder.
23 /* split_at_right() looks for the rightmost delimiter
24 /* occurrence, but is otherwise identical to split_at().
26 /* The result is a null pointer when the delimiter character
31 /* A split_at() routine appears in the TCP Wrapper software
36 /* The Secure Mailer license must be distributed with this software.
39 /* IBM T.J. Watson Research
41 /* Yorktown Heights, NY 10598, USA
44 /* System libraries */
49 /* Utility library. */
53 /* split_at - break string at first delimiter, return remainder */
55 char *split_at(char *string
, int delimiter
)
59 if ((cp
= strchr(string
, delimiter
)) != 0)
64 /* split_at_right - break string at last delimiter, return remainder */
66 char *split_at_right(char *string
, int delimiter
)
70 if ((cp
= strrchr(string
, delimiter
)) != 0)