BOOTSTRAP (kutils) functions


LIBRARY ROUTINE

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

OUTPUT

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.