Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

index(3)

rindex(3)

strcat(3)

strcmp(3)

strcspn(3)

strchr(3)

strcpy(3)

strlen(3)

strncat(3)

strncmp(3)

strncpy(3)

strrchr(3)

strspn(3)



  strpbrk(3)                          CLIX                          strpbrk(3)



  NAME

    strpbrk - Searches a string for the first occurence of any character in a
    second string

  LIBRARY

    Standard C Library (libc.a)

  SYNOPSIS

    #include <string.h>

    char *strpbrk(
      char * string1 ,
      char * string2 );

  PARAMETERS

    string1
           A pointer to a character string

    string2
           A pointer to a character string

  DESCRIPTION

    The strpbrk() function returns a pointer to the first occurrence in the
    string pointed to by the string1 parameter of any character from the
    string pointed to by the string2 parameter, or to a NULL pointer if no
    character from string2 exists in string1.

  EXAMPLES

    #include <stdio.h>
    #include <string.h>

    main()
    {
         char *string = "hello world!";
         char *first_vowel;

         first_vowel = strpbrk(string, "aeiou");

         if (first_vowel)
              printf ("The first vowel in '%s' is %c\n", string, first_vowel[0]);
         else
              printf ("There are no vowels in '%s'\n");
    }





  2/94 - Intergraph Corporation                                              1






  strpbrk(3)                          CLIX                          strpbrk(3)



  RELATED INFORMATION

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

















































  2                                              Intergraph Corporation - 2/94




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