utf8len

Computes the length of a string.

Library:LibC
Service:Characters and Strings

Syntax

  #include <utf8.h> 
   
  size_t utf8len (
     const utf8_t  *string);
  

Parameters

string

(IN) Points to the string whose length is to be computed.

Return Values

Returns the number of characters (not bytes) in a UTF-8 string. The string is measured against the code page currently in place within the hosting system.

Remarks

The utf8len function accepts a null-terminated, potential UTF-8 string in the current code page, measures it, and returns its length.

See Also