diff options
Diffstat (limited to 'common/eurephia_xml.c')
-rw-r--r-- | common/eurephia_xml.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/common/eurephia_xml.c b/common/eurephia_xml.c index d47ef85..dec397f 100644 --- a/common/eurephia_xml.c +++ b/common/eurephia_xml.c @@ -43,6 +43,27 @@ /** + * String replace in a xmlChar based string + * + * @param str xmlChar input string + * @param s search for this character + * @param r replace the character with this one + */ +void xmlReplaceChars(xmlChar *str, char s, char r) { + if( str != NULL ) { + xmlChar *ptr = str; + + while( *ptr != '\0' ) { + if( *ptr == s ) { + *ptr = r; + } + ptr++; + } + } +} + + +/** * Retrieves a given XML node attribute/property * * @param attr xmlAttr pointer from an xmlNode pointer. |