cvs.delorie.com/djgpp/doc/libc/libc_774.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

strspn

Syntax

 
#include <string.h>

size_t strspn(const char *s1, const char *set);

Description

This function finds the first character in s1 that does not match any character in set. Note that the NULL bytes at the end of s1 counts, so you'll at least get a pointer to the end of the string if nothing else.

Return Value

The index of the found character.

Portability

ANSI/ISO C C89; C99
POSIX 1003.2-1992; 1003.1-2001

Example

 
int i = strspn(entry, " \t\b");
if (entry[i])
  do_something();


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004