TypeScript API Documentation for GLIB
API Version: 2.0
Library Version: 2.86.4
Generated with TypeDoc via ts-for-gir v4.0.0-beta.40
For each character in string, if the character is not in valid_chars, replaces the character with substitutor.
string
valid_chars
substitutor
Modifies string in place, and return string itself, not a copy. The return value is to allow nesting such as:
g_ascii_strup (g_strcanon (str, "abc", '?')) Copy
g_ascii_strup (g_strcanon (str, "abc", '?'))
In order to modify a copy, you may use GLib.strdup:
reformatted = g_strcanon (g_strdup (const_str), "abc", '?');…g_free (reformatted); Copy
reformatted = g_strcanon (g_strdup (const_str), "abc", '?');…g_free (reformatted);
a nul-terminated array of bytes
bytes permitted in string
replacement character for disallowed bytes
the modified string
For each character in
string, if the character is not invalid_chars, replaces the character withsubstitutor.Modifies
stringin place, and returnstringitself, not a copy. The return value is to allow nesting such as:In order to modify a copy, you may use GLib.strdup: