Go to main content

man pages section 3: Library Interfaces and Headers

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

ne_token (3)

Name

ne_token - string tokenizers

Synopsis

#include <ne_string.h>

char *ne_token(char **str, char sep);

char *ne_qtoken(char **str, char sep, const char *quotes);

Description

NE_TOKEN(3)                   neon API reference                   NE_TOKEN(3)



NAME
       ne_token, ne_qtoken - string tokenizers

SYNOPSIS
       #include <ne_string.h>

       char *ne_token(char **str, char sep);

       char *ne_qtoken(char **str, char sep, const char *quotes);

DESCRIPTION
       ne_token and ne_qtoken tokenize the string at the location stored in
       the pointer str. Each time the function is called, it returns the next
       token, and modifies the str pointer to point to the remainer of the
       string, or NULL if there are no more tokens in the string. A token is
       delimited by the separator character sep; if ne_qtoken is used any
       quoted segments of the string are skipped when searching for a
       separator. A quoted segment is enclosed in a pair of one of the
       characters given in the quotes string.

       The string being tokenized is modified each time the tokenizing
       function is called; replacing the next separator character with a NUL
       terminator.

EXAMPLES
       The following function prints out each token in a comma-separated
       string list, which is modified in-place:

           static void splitter(char *list)
           {
             do {
               printf("Token: %s\n", ne_token(&list, ','));
             while (list);
           }

AUTHOR
       Joe Orton <neon@lists.manyfish.co.uk>
           Author.

COPYRIGHT
ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+------------------+
       |ATTRIBUTE TYPE | ATTRIBUTE VALUE  |
       +---------------+------------------+
       |Availability   | library/neon     |
       +---------------+------------------+
       |Stability      | Volatile         |
       +---------------+------------------+

NOTES
       Source code for open source software components in Oracle Solaris can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-
       code-downloads.html.

       This software was built from source available at
       https://github.com/oracle/solaris-userland.  The original community
       source was downloaded from
       http://www.webdav.org/neon/neon-0.30.1.tar.gz.

       Further information about this software can be found on the open source
       community website at http://www.webdav.org/neon/.



neon 0.30.1                    23 September 2014                   NE_TOKEN(3)