strspn, strcspn - get length of a prefix substring


   #include <string.h>

   size_t strspn(const char *s, const char *accept);

   size_t strcspn(const char *s, const char *reject);


   The  strspn()  function calculates the length (in bytes) of the initial
   segment of s which consists entirely of bytes in accept.

   The strcspn() function calculates the length of the initial segment  of
   s which consists entirely of bytes not in reject.


   The  strspn()  function  returns  the  number  of  bytes in the initial
   segment of s which consist only of bytes from accept.

   The strcspn() function returns the  number  of  bytes  in  the  initial
   segment of s which are not in the string reject.


   For   an   explanation   of   the  terms  used  in  this  section,  see

   Interface            Attribute      Value   
   strspn(), strcspn()  Thread safety  MT-Safe 


   POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.


   index(3),  memchr(3),  rindex(3),  strchr(3),  string(3),   strpbrk(3),
   strsep(3), strstr(3), strtok(3), wcscspn(3), wcsspn(3)


   This  page  is  part of release 4.09 of the Linux man-pages project.  A
   description of the project, information about reporting bugs,  and  the
   latest     version     of     this    page,    can    be    found    at

                              2015-08-08                         STRSPN(3)

More Linux Commands

Mail::SpamAssassin::Plugin::TextCat(3pm) - TextCat language
This plugin will try to guess the language used in the message body text. You can use the ok_languages directive to set which languages are considered okay for

ldattach(8) - attach a line discipline to a serial line.....
The ldattach daemon opens the specified device file (which should refer to a serial device) and attaches the line discipline ldisc to it for processing of the s

auparse_find_field(3) - search for field name (Man Page)....
auparse_find_field will scan all records in an event to find the first occurance of the field name passed to it. Searching begins from the cursors current posit

regexec(3) - POSIX regex functions - Linux manual page......
POSIX regex compiling regcomp() is used to compile a regular expression into a form that is suitable for subsequent regexec() searches. regcomp() is supplied wi

Tcl_SetAssocData(3) - manage associations of string keys and
These procedures allow extensions to associate their own data with a Tcl interpreter. An association consists of a string key, typically the name of the extensi

newterm(3ncurses) - curses screen initialization and manipul
initscr is normally the first curses routine to call when initializing a program. A few special routines sometimes need to be called before it; these are slk_in

glGenLists(3gl) - generate a contiguous set of empty display
glGenLists has one argument, range. It returns an integer n such that range contiguous empty display lists, named n, n+1, ..., n+range -1, are created. If range

XkbSAPtrDfltValue(3) - Returns the valueXXX field of act con
XkbSAPtrDfltValue.3 - Actions associated with the XkbPtrDfltAction structure change the mk_dflt_btn attribute of the MouseKeys control. If the MouseKeys control

use_env_sp(3ncurses) - curses screen-pointer extension......
This implementation can be configured to provide a set of functions which improve the ability to manage multiple screens. This feature can be added to any of th

gnutls_x509_crl_deinit(3) - API function - Linux man page...
This function will deinitialize a CRL structure. REPORTING BUGS Report bugs to &lt;;. GnuTLS home page: Gener

unxz(1) - Compress or decompress .xz and .lzma files........
xz is a general-purpose data compression tool with command line syntax similar to gzip(1) and bzip2(1). The native file format is the .xz format, but the legacy

sane-plustek_pp(5) - SANE backend for Plustek parallel port
The sane-plustek_pp library implements a SANE (Scanner Access Now Easy) backend that provides access to Plustek ASIC 9600[1/3] and P9800[1/3] based parallel por

We can't live, work or learn in freedom unless the software we use is free.