User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







c:string.h:strpbrk
click
to support this page (eg 0,42 € or so) Thanks.
#include <string.h>
char *strpbrk(char *s1, const char *s2);

finds the first occurrence of a character.

#include <stdio.h> /* including standard library */
//#include <windows.h> /* uncomment this for Windows */
 
#include <string.h>
 
int main( void ) {
    char string1[]="You can help with your experience to improve this page";
    char string2[]="help";
 
    printf("So please %s\n", strpbrk( string1, string2 ) );
    return 0;
}

Output:

  user@host:~$ ./strpbrk 
  So please help with your experience to improve this page
      
advertising
c/string.h/strpbrk.txt · Last modified: 2013/02/17 01:24 by Daniel Gohlke

Impressum