rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=3b30b89d62aac1d302ffe82ca9df9e323b15f9c8

commit 3b30b89d62aac1d302ffe82ca9df9e323b15f9c8
Author: Vyacheslav Reutskiy <v.reuts...@samsung.com>
Date:   Tue Jan 5 09:46:22 2016 +0200

    string_common: add functions for replace charactes in the string
    
    Change-Id: Id651eae4ed520bfa1da592058756eb28b19c58ad
---
 src/bin/common/string_common.c | 12 ++++++++++++
 src/bin/common/string_common.h |  4 ++++
 2 files changed, 16 insertions(+)

diff --git a/src/bin/common/string_common.c b/src/bin/common/string_common.c
index 5be62ac..d5de437 100644
--- a/src/bin/common/string_common.c
+++ b/src/bin/common/string_common.c
@@ -47,3 +47,15 @@ state_name_split(Eina_Stringshare *name, Eina_Stringshare 
**name_out, double *va
    free(state_split[0]);
    free(state_split);
 }
+
+void
+string_char_replace(char *str, char src, char rep)
+{
+   assert(str != NULL);
+
+   while (*str != '\0')
+     {
+        if (*str == src) *str = rep;
+        str++;
+     }
+}
diff --git a/src/bin/common/string_common.h b/src/bin/common/string_common.h
index d241ae5..3c471de 100644
--- a/src/bin/common/string_common.h
+++ b/src/bin/common/string_common.h
@@ -54,4 +54,8 @@ sort_cb(const void *data1, const void *data2);
 
 void
 state_name_split(Eina_Stringshare *name, Eina_Stringshare **name_out, double 
*val_out);
+
+void
+string_char_replace(char *str, char src, char rep);
+
 #endif /* STRING_MACRO_H */

-- 


Reply via email to