| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 void prependScalar(SkScalar value) { this->insertScalar((size_t)-1, value);
} | 192 void prependScalar(SkScalar value) { this->insertScalar((size_t)-1, value);
} |
| 193 | 193 |
| 194 void printf(const char format[], ...) SK_PRINTF_LIKE(2, 3); | 194 void printf(const char format[], ...) SK_PRINTF_LIKE(2, 3); |
| 195 void appendf(const char format[], ...) SK_PRINTF_LIKE(2, 3); | 195 void appendf(const char format[], ...) SK_PRINTF_LIKE(2, 3); |
| 196 void appendVAList(const char format[], va_list); | 196 void appendVAList(const char format[], va_list); |
| 197 void prependf(const char format[], ...) SK_PRINTF_LIKE(2, 3); | 197 void prependf(const char format[], ...) SK_PRINTF_LIKE(2, 3); |
| 198 void prependVAList(const char format[], va_list); | 198 void prependVAList(const char format[], va_list); |
| 199 | 199 |
| 200 void remove(size_t offset, size_t length); | 200 void remove(size_t offset, size_t length); |
| 201 | 201 |
| 202 void replace(SkUnichar oldChar, SkUnichar newChar); |
| 203 |
| 202 SkString& operator+=(const SkString& s) { this->append(s); return *this; } | 204 SkString& operator+=(const SkString& s) { this->append(s); return *this; } |
| 203 SkString& operator+=(const char text[]) { this->append(text); return *this;
} | 205 SkString& operator+=(const char text[]) { this->append(text); return *this;
} |
| 204 SkString& operator+=(const char c) { this->append(&c, 1); return *this; } | 206 SkString& operator+=(const char c) { this->append(&c, 1); return *this; } |
| 205 | 207 |
| 206 /** | 208 /** |
| 207 * Swap contents between this and other. This function is guaranteed | 209 * Swap contents between this and other. This function is guaranteed |
| 208 * to never fail or throw. | 210 * to never fail or throw. |
| 209 */ | 211 */ |
| 210 void swap(SkString& other); | 212 void swap(SkString& other); |
| 211 | 213 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 239 // Specialized to take advantage of SkString's fast swap path. The unspecialized
function is | 241 // Specialized to take advantage of SkString's fast swap path. The unspecialized
function is |
| 240 // declared in SkTypes.h and called by SkTSort. | 242 // declared in SkTypes.h and called by SkTSort. |
| 241 template <> inline void SkTSwap(SkString& a, SkString& b) { | 243 template <> inline void SkTSwap(SkString& a, SkString& b) { |
| 242 a.swap(b); | 244 a.swap(b); |
| 243 } | 245 } |
| 244 | 246 |
| 245 // Split str on any characters in delimiters into out. (Think, strtok with a sa
ne API.) | 247 // Split str on any characters in delimiters into out. (Think, strtok with a sa
ne API.) |
| 246 void SkStrSplit(const char* str, const char* delimiters, SkTArray<SkString>* out
); | 248 void SkStrSplit(const char* str, const char* delimiters, SkTArray<SkString>* out
); |
| 247 | 249 |
| 248 #endif | 250 #endif |
| OLD | NEW |