Add support for empty replaced string

This commit is contained in:
Patrick Pelissier committed 2020-11-22 23:29:38 +01:00
1 parent 2e4404ca7e
commit b343d356c3
3 files changed
+10 -1

No files matched your search

+2
View File
@@ -5078,12 +5078,14 @@ Replace in the string 'v' from the offset 'start'
the string 'str1' by the string 'str2' once.
Returns the offset of the replacement or STRING_FAILURE if no replacement
was performed.
str1 shall be a non empty string.
##### size\_t string\_replace\_all\_str (string\_t v, const char str1[], const char str2[])
##### size\_t string\_replace\_all (string\_t v, const string\_t str1, const string\_t str2)
Replace in the string 'v' all the occurences of
the string 'str1' by the string 'str2'.
str1 shall be a non empty string.
##### void string\_replace\_at (string\_t v, size\_t pos, size\_t len, const char str2[])