[utils] string_replace_char does single byte/character replacement, new string_replace to do full string replacement, again using char_array for safety, string_replace_with_array function for memory reuse

This commit is contained in:
Al
2017-02-17 13:58:51 -05:00
parent da856ea5c3
commit b88487f633
3 changed files with 51 additions and 4 deletions

View File

@@ -55,7 +55,9 @@ void string_lower(char *s);
bool string_is_upper(char *s);
void string_upper(char *s);
char *string_replace(char *s, char c1, char c2);
char *string_replace_char(char *str, char c1, char c2);
bool string_replace_with_array(char *str, char *replace, char *with, char_array *result);
char *string_replace(char *str, char *replace, char *with);
bool string_starts_with(const char *str, const char *start);
bool string_ends_with(const char *str, const char *ending);