utf8spn

Computes the length of a substring.

Library:LibC
Classification:ANSI
Service:Characters and Strings

Syntax

  #include <utf8.h> 
   
  size_t   utf8spn (
     const utf8_t   *string,
     const utf8_t   *charset);
  

Parameters

string

(IN) Points to a null-terminated string to scan.

charset

(IN) Points to a null-terminated set of characters to locate.

Return Values

Returns the length of the initial segment.

Remarks

The utf8spn function computes the length of the maximum initial segment of the string pointed to by string, which consists entirely of characters from the string pointed to by charset. The null-terminating character is not considered to be part of charset.

See Also