Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: include/core/SkString.h

Issue 322253005: add replace_char() method to SkString API (skbug.com/2651) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Faster replacement + added unit tests Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/core/SkString.cpp » ('j') | tests/StringTest.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkString.h
diff --git a/include/core/SkString.h b/include/core/SkString.h
index bc06cb0aba63743e90f6869f6f042c98011b1267..e1d2c3590ad6a5f17de07483091b5c10af1fbd4e 100644
--- a/include/core/SkString.h
+++ b/include/core/SkString.h
@@ -191,6 +191,9 @@ public:
void prependHex(uint32_t value, int minDigits = 0) { this->insertHex(0, value, minDigits); }
void prependScalar(SkScalar value) { this->insertScalar((size_t)-1, value); }
+ /* Replace all occurrences of oldChar with newChar */
reed1 2014/06/11 13:40:50 Please document what happens - if oldChar or newCh
+ void replaceChar(const char oldChar, const char newChar);
reed1 2014/06/11 13:40:50 we don't say 'const' for non-ptr/ref parameters
+
void printf(const char format[], ...) SK_PRINTF_LIKE(2, 3);
void appendf(const char format[], ...) SK_PRINTF_LIKE(2, 3);
void appendVAList(const char format[], va_list);
« no previous file with comments | « no previous file | src/core/SkString.cpp » ('j') | tests/StringTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698