Index: tools/picture_utils.cpp |
diff --git a/tools/picture_utils.cpp b/tools/picture_utils.cpp |
index ee189ad7855cfa90683b4463197ee05ce20d0d0f..4bcdf8a964620fe974d2eda915c4f67f61341844 100644 |
--- a/tools/picture_utils.cpp |
+++ b/tools/picture_utils.cpp |
@@ -36,6 +36,17 @@ namespace sk_tools { |
} |
} |
+ void replace_char(SkString* str, const char oldChar, const char newChar) { |
+ if (NULL == str) { |
+ return; |
+ } |
+ for (size_t i = 0; i < str->size(); ++i) { |
+ if (oldChar == str->operator[](i)) { |
+ str->operator[](i) = newChar; |
+ } |
+ } |
+ } |
+ |
void make_filepath(SkString* path, const SkString& dir, const SkString& name) { |
size_t len = dir.size(); |
path->set(dir); |