strdelimit

Converts any delimiter characters in string to new_delimiter.

Any characters in string which are found in delimiters are changed to the new_delimiter character. Modifies string in place, and returns string itself, not a copy.

The return value is to allow nesting such as:

g_ascii_strup (g_strdelimit (str, "abc", '?'))

In order to modify a copy, you may use funcGLib.strdup:

reformatted = g_strdelimit (g_strdup (const_str), "abc", '?');
…
g_free (reformatted);
string
strdelimit
(
string string_
,
string delimiters
,)

Parameters

string_ string

the string to convert

delimiters string

a string containing the current delimiters, or NULL to use the standard delimiters defined in glib.types.STR_DELIMITERS

newDelimiter char

the new delimiter character

Return Value

Type: string

the modified string