string: Add find and replace function

This adds g_string_replace(), a function that replaces instances of one string
with another in a GString. It allows the caller to specify the maximum number
of replacements to perform, and returns the number of replacements performed
to the caller.

Fixes: #225
This commit is contained in:
Joshua Lee
2021-02-09 10:50:16 +00:00
committed by Philip Withnall
parent 203e078fdf
commit c576a4cd82
4 changed files with 84 additions and 0 deletions

View File

@@ -2861,6 +2861,7 @@ g_string_insert_unichar
g_string_insert_len
g_string_overwrite
g_string_overwrite_len
g_string_replace
g_string_erase
g_string_truncate
g_string_set_size