GLib.utf8_strchr

function utf8_strchr(p: String, len: Number(gssize), c: String): String {
    // Gjs wrapper for g_utf8_strchr()
}
  

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.

p

a nul-terminated UTF-8 encoded string

len

the maximum length of p

c

a Unicode character

Returns

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.