File:  [MW Coherent from dump] / coherent / a / usr / man / ALL / strpbrk
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:34 2019 UTC (7 years ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent



strpbrk()                String Function                strpbrk()




Find first occurrence of a character from another string

#include <string.h>
cchhaarr *ssttrrppbbrrkk(_s_t_r_i_n_g_1, _s_t_r_i_n_g_2);
cchhaarr *_s_t_r_i_n_g_1, *_s_t_r_i_n_g_2;

strpbrk returns a pointer  to the first character in string1 that
matches any character in  string2.  It returns NULL if no charac-
ter in string1 matches a character in string2.

The set of characters  that string2 points to is sometimes called
the ``break string''.  For example,


        char *string = "To be, or not to be: that is the question.";
        char *brkset = ",;";
        strpbrk(string, brkset);


returns the  value of the pointer ssttrriinngg  plus five.  This points
to the comma, which is the first character in the area pointed to
by ssttrriinngg that matches any  character in the string pointed to by
bbrrkksseett.

***** See Also *****

string functions, string.h

***** Notes *****

strpbrk resembles  the function strtok in  functionality, but un-
like strtok, it preserves  the contents of the strings being com-
pared.   It also  resembles  the function  strchr,  but lets  you
search for any one of a  group of characters, rather than for one
character alone.





















COHERENT Lexicon                                           Page 1



unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.