Index: src/core/SkString.cpp |
diff --git a/src/core/SkString.cpp b/src/core/SkString.cpp |
index 48459dbbd8ac69eabb6f2f72cbbf1c9ff862e7f5..db85d188a5432e4bbb15867077877ff3fc0b8174 100644 |
--- a/src/core/SkString.cpp |
+++ b/src/core/SkString.cpp |
@@ -620,6 +620,14 @@ void SkString::remove(size_t offset, size_t length) { |
} |
} |
+void SkString::replace(SkUnichar oldChar, SkUnichar newChar) { |
+ for (size_t i = 0; i < size(); ++i) { |
+ if (oldChar == this->operator[](i)) { |
+ this->operator[](i) = newChar; |
+ } |
+ } |
+} |
+ |
void SkString::swap(SkString& other) { |
this->validate(); |
other.validate(); |