delorie.com/djgpp/doc/libc/libc_757.html | search |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#include <string.h> size_t strcspn(const char *s1, const char *set); |
This function finds the first character in s1 that matches any
character in set. Note that the NULL
bytes at the end of
each string counts, so you'll at least get a pointer to the end of the
string if nothing else.
The index of the found character.
ANSI/ISO C | C89; C99 |
POSIX | 1003.2-1992; 1003.1-2001 |
int i = strcspn(command, "<>|"); if (command[i]) do_redirection(); |
webmaster | delorie software privacy |
Copyright © 2004 | Updated Apr 2004 |