Unicode.utf8Strchr

Finds the leftmost occurrence of the given Unicode character in a UTF-8 encoded string, while limiting the search to @len bytes. If @len is -1, allow unbounded search.

struct Unicode
static
string
utf8Strchr
(
string p
,
ptrdiff_t len
,
dchar c
)

Parameters

p string

a nul-terminated UTF-8 encoded string

len ptrdiff_t

the maximum length of @p

c dchar

a Unicode character

Return Value

Type: string

%NULL if the string does not contain the character, otherwise, a pointer to the start of the leftmost occurrence of the character in the string.

Meta