kparse_string_delimit - break a string into an array of strings based on some set of delimiters.
LIBRARY CALL
char **kparse_string_delimit(
char *data,
char *delimiter,
int mode,
ssize_t *num)
INPUT
data - the data string to delimit
delimiter - the list of delimiters to use
mode - the delimit mode
KLITERAL - delimit on delimiters, leave
extra whitespace, and leave
NULL entries in the array
if two delimiters are next
to each other.
KDELIM_CLEAN - eliminate whitespace on
strings, and ignore two
delimiters next to each other
OUTPUT
num - the number of items in the list
RETURN VALUE
This routine returns a pointer to an array of items we just
broke apart from the input data string.
DESCRIPTION
This routine parses the input data string according to a set
of single character delimiters. These delimiters can be
escaped by a '\\' inside of the data string if the delimiter
must appear as an item; hence, you cannot use a '\\' as a
delimiter. The new array is created via calls to
the karray_add() library call, and a pointer to the new
array is returned back to the calling routine
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
This routine creates a new array of strings, and the
calling routine is responsible for freeing the space
allocated while creating the array via a call to
karray_free().
RESTRICTIONS
none
MODIFICATION
none
FILES
$BOOTSTRAP/objects/library/kutils/src/parse.c
SEE ALSO
karray_add(kutils), karray_free(kutils)
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.