diff options
Diffstat (limited to 'discover/parser-conf.c')
-rw-r--r-- | discover/parser-conf.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/discover/parser-conf.c b/discover/parser-conf.c index 88e96b7..6926a92 100644 --- a/discover/parser-conf.c +++ b/discover/parser-conf.c @@ -58,6 +58,22 @@ char *conf_strip_str(char *s) } /** + * conf_replace_char - replace one char with another. + */ + +char *conf_replace_char(char *s, char from, char to) +{ + if (!s) + return NULL; + + for ( ; *s; s++) + if (*s == from) + *s = to; + + return s; +} + +/** * conf_get_param_pair - Get the next 'name=value' parameter pair. * @str: The string to process. * @name_out: Returns a pointer to the name. |