utf8chr

Locates the first occurrence of a specified character in a UTF-8 string.

Library:LibC
Service:Characters and Strings

Syntax

  #include <utf8.h>
  
  utf8_t *utf8chr (
     const utf8_t  *string,
     const utf8_t  *ch);
  

Parameters

string

(IN) Points to the string containing characters for which to search.

ch

Points to the address of a character. ch must be passed a character's address because it can contain either a single or multi-byte expression of a UTF-8 character.

Return Values

Returns a pointer to the located character, or NULL if the character does not occur in the string.

Remarks

The null-terminating character is considered to be part of the string.

See Also

utf8rchr