Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

malloc(3)

bstring(3)

strcat(3)

strncat(3)

strcmp(3)

strncmp(3)

strcpy(3)

strncpy(3)

strlen(3)

strchr(3)

strrchr(3)

strpbrk(3)

strspn(3)

strcspn(3)

strstr(3)

index(3)

rindex(3)



  strtok(3)                           CLIX                           strtok(3)



  NAME

    strtok - Keeps the function's position while it works on a string

  LIBRARY

    Standard C Library (libc.a)

  SYNOPSIS

    #include <string.h>

    char *strtok(
      char *s1 ,
      const char *s2 );

  PARAMETERS

    s1   A pointer to a character string.

    s2   A pointer to a character string.

  DESCRIPTION

    The strtok() function considers the string s1 to consist of a sequence of
    zero or more text tokens separated by spans of one or more characters from
    the separator string  s2.  The first call (with pointer s1 specified)
    returns a pointer to the first character of the first token, and will have
    written a null character into s1 immediately following the returned token.
    The function keeps track of its position in the string between separate
    calls, so that subsequent calls (which must be made with the first
    argument a NULL pointer) will work through the string s1 immediately
    following that token.  In this way subsequent calls will work through the
    string s1 until no tokens remain.  The separator string s2 may be
    different from call to call.  When no token remains in s1, a NULL pointer
    is returned.

    This function operates on null-terminated strings.

  RETURN VALUES

    When no token remains in s1, a NULL pointer is returned.

  RELATED INFORMATION

    Functions:  malloc(3), bstring(3), strcat(3), strncat(3), strcmp(3),
    strncmp(3), strcpy(3), strncpy(3), strlen(3), strchr(3), strrchr(3),
    strpbrk(3), strspn(3), strcspn(3), strstr(3), index(3), rindex(3)






  2/94 - Intergraph Corporation                                              1




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026