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.
I've added the WIP: prefix as I'm unsure if this implementation is a little too naive for GLib, and I must also fill in the Since: tag in the documentation.
Fixes: #225 (closed)
Edited by Philip Withnall