OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkString_DEFINED | 10 #ifndef SkString_DEFINED |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 void prependScalar(SkScalar value) { this->insertScalar((size_t)-1, value);
} | 208 void prependScalar(SkScalar value) { this->insertScalar((size_t)-1, value);
} |
209 | 209 |
210 void printf(const char format[], ...) SK_PRINTF_LIKE(2, 3); | 210 void printf(const char format[], ...) SK_PRINTF_LIKE(2, 3); |
211 void appendf(const char format[], ...) SK_PRINTF_LIKE(2, 3); | 211 void appendf(const char format[], ...) SK_PRINTF_LIKE(2, 3); |
212 void appendVAList(const char format[], va_list); | 212 void appendVAList(const char format[], va_list); |
213 void prependf(const char format[], ...) SK_PRINTF_LIKE(2, 3); | 213 void prependf(const char format[], ...) SK_PRINTF_LIKE(2, 3); |
214 void prependVAList(const char format[], va_list); | 214 void prependVAList(const char format[], va_list); |
215 | 215 |
216 void remove(size_t offset, size_t length); | 216 void remove(size_t offset, size_t length); |
217 | 217 |
| 218 void replace(SkUnichar oldChar, SkUnichar newChar); |
| 219 |
218 SkString& operator+=(const SkString& s) { this->append(s); return *this; } | 220 SkString& operator+=(const SkString& s) { this->append(s); return *this; } |
219 SkString& operator+=(const char text[]) { this->append(text); return *this;
} | 221 SkString& operator+=(const char text[]) { this->append(text); return *this;
} |
220 SkString& operator+=(const char c) { this->append(&c, 1); return *this; } | 222 SkString& operator+=(const char c) { this->append(&c, 1); return *this; } |
221 | 223 |
222 /** | 224 /** |
223 * Swap contents between this and other. This function is guaranteed | 225 * Swap contents between this and other. This function is guaranteed |
224 * to never fail or throw. | 226 * to never fail or throw. |
225 */ | 227 */ |
226 void swap(SkString& other); | 228 void swap(SkString& other); |
227 | 229 |
(...skipping 27 matching lines...) Expand all Loading... |
255 // Specialized to take advantage of SkString's fast swap path. The unspecialized
function is | 257 // Specialized to take advantage of SkString's fast swap path. The unspecialized
function is |
256 // declared in SkTypes.h and called by SkTSort. | 258 // declared in SkTypes.h and called by SkTSort. |
257 template <> inline void SkTSwap(SkString& a, SkString& b) { | 259 template <> inline void SkTSwap(SkString& a, SkString& b) { |
258 a.swap(b); | 260 a.swap(b); |
259 } | 261 } |
260 | 262 |
261 // Split str on any characters in delimiters into out. (Think, strtok with a sa
ne API.) | 263 // Split str on any characters in delimiters into out. (Think, strtok with a sa
ne API.) |
262 void SkStrSplit(const char* str, const char* delimiters, SkTArray<SkString>* out
); | 264 void SkStrSplit(const char* str, const char* delimiters, SkTArray<SkString>* out
); |
263 | 265 |
264 #endif | 266 #endif |
OLD | NEW |