diff options
author | Jeff Trawick <trawick@apache.org> | 2001-05-23 14:15:53 +0000 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2001-05-23 14:15:53 +0000 |
commit | 645aa0a4c091fd964451498eff16f84508ca46bc (patch) | |
tree | d225c2777683baa738ea75c4b4b204b571359a92 /include/apr_strings.h | |
parent | fb8caf461bb320b55ea23dd399e6251f2935207f (diff) | |
download | apr-645aa0a4c091fd964451498eff16f84508ca46bc.tar.gz |
Add apr_strtok(), a thread-safe flavor of strtok() which has the
same interface as strtok_r().
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61673 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_strings.h')
-rw-r--r-- | include/apr_strings.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/apr_strings.h b/include/apr_strings.h index 3aea147af..acbe0cee9 100644 --- a/include/apr_strings.h +++ b/include/apr_strings.h @@ -220,6 +220,20 @@ APR_DECLARE(apr_status_t) apr_tokenize_to_argv(const char *arg_str, char ***argv_out, apr_pool_t *token_context); +/** + * Split a string into separate '\0'-terminated tokens. The tokens are + * delimited in the string by one or more characters from the sep + * argument. + * @param str The string to separate; this should be specified on the + * first call to apr_strtok() for a given string, and NULL + * on subsequent calls. + * @param sep The set of delimiters + * @param last Internal state saved by apr_strtok() between calls. + * @return The next token from the string + * @deffunc char *apr_strtok(char *str, const char *sep, char **last) + */ +APR_DECLARE(char *) apr_strtok(char *str, const char *sep, char **last); + /* * These are snprintf implementations based on apr_vformatter(). * |