www.delorie.com/djgpp/doc/libc-2.01/libc_621.html   search  
Go to the first, previous, next, last section, table of contents.


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.

Example

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


Go to the first, previous, next, last section, table of contents.

  prev next   webmaster     delorie software   privacy  
  Copyright © 1997     Updated Apr 1997