| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 void prepend(const char text[]) { this->insert(0, text); } | 178 void prepend(const char text[]) { this->insert(0, text); } |
| 179 void prepend(const char text[], size_t len) { this->insert(0, text, len); } | 179 void prepend(const char text[], size_t len) { this->insert(0, text, len); } |
| 180 void prependUnichar(SkUnichar uni) { this->insertUnichar(0, uni); } | 180 void prependUnichar(SkUnichar uni) { this->insertUnichar(0, uni); } |
| 181 void prependS32(int32_t value) { this->insertS32(0, value); } | 181 void prependS32(int32_t value) { this->insertS32(0, value); } |
| 182 void prependS64(int32_t value, int minDigits = 0) { this->insertS64(0, value
, minDigits); } | 182 void prependS64(int32_t value, int minDigits = 0) { this->insertS64(0, value
, minDigits); } |
| 183 void prependHex(uint32_t value, int minDigits = 0) { this->insertHex(0, valu
e, minDigits); } | 183 void prependHex(uint32_t value, int minDigits = 0) { this->insertHex(0, valu
e, minDigits); } |
| 184 void prependScalar(SkScalar value) { this->insertScalar((size_t)-1, value);
} | 184 void prependScalar(SkScalar value) { this->insertScalar((size_t)-1, value);
} |
| 185 | 185 |
| 186 void printf(const char format[], ...) SK_PRINTF_LIKE(2, 3); | 186 void printf(const char format[], ...) SK_PRINTF_LIKE(2, 3); |
| 187 void appendf(const char format[], ...) SK_PRINTF_LIKE(2, 3); | 187 void appendf(const char format[], ...) SK_PRINTF_LIKE(2, 3); |
| 188 void appendf(const char format[], va_list); |
| 188 void prependf(const char format[], ...) SK_PRINTF_LIKE(2, 3); | 189 void prependf(const char format[], ...) SK_PRINTF_LIKE(2, 3); |
| 189 | 190 |
| 190 void remove(size_t offset, size_t length); | 191 void remove(size_t offset, size_t length); |
| 191 | 192 |
| 192 SkString& operator+=(const SkString& s) { this->append(s); return *this; } | 193 SkString& operator+=(const SkString& s) { this->append(s); return *this; } |
| 193 SkString& operator+=(const char text[]) { this->append(text); return *this;
} | 194 SkString& operator+=(const char text[]) { this->append(text); return *this;
} |
| 194 SkString& operator+=(const char c) { this->append(&c, 1); return *this; } | 195 SkString& operator+=(const char c) { this->append(&c, 1); return *this; } |
| 195 | 196 |
| 196 /** | 197 /** |
| 197 * Swap contents between this and other. This function is guaranteed | 198 * Swap contents between this and other. This function is guaranteed |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 /// Creates a new string and writes into it using a printf()-style format. | 245 /// Creates a new string and writes into it using a printf()-style format. |
| 245 SkString SkStringPrintf(const char* format, ...); | 246 SkString SkStringPrintf(const char* format, ...); |
| 246 | 247 |
| 247 // Specialized to take advantage of SkString's fast swap path. The unspecialized
function is | 248 // Specialized to take advantage of SkString's fast swap path. The unspecialized
function is |
| 248 // declared in SkTypes.h and called by SkTSort. | 249 // declared in SkTypes.h and called by SkTSort. |
| 249 template <> inline void SkTSwap(SkString& a, SkString& b) { | 250 template <> inline void SkTSwap(SkString& a, SkString& b) { |
| 250 a.swap(b); | 251 a.swap(b); |
| 251 } | 252 } |
| 252 | 253 |
| 253 #endif | 254 #endif |
| OLD | NEW |