Flutter Engine
The Flutter Engine
|
#include <SkString.h>
Public Types | |
using | sk_is_trivially_relocatable = std::true_type |
Public Member Functions | |
SkString () | |
SkString (size_t len) | |
SkString (const char text[]) | |
SkString (const char text[], size_t len) | |
SkString (const SkString &) | |
SkString (SkString &&) | |
SkString (const std::string &) | |
SkString (std::string_view) | |
~SkString () | |
bool | isEmpty () const |
size_t | size () const |
const char * | data () const |
const char * | c_str () const |
char | operator[] (size_t n) const |
bool | equals (const SkString &) const |
bool | equals (const char text[]) const |
bool | equals (const char text[], size_t len) const |
bool | startsWith (const char prefixStr[]) const |
bool | startsWith (const char prefixChar) const |
bool | endsWith (const char suffixStr[]) const |
bool | endsWith (const char suffixChar) const |
bool | contains (const char substring[]) const |
bool | contains (const char subchar) const |
int | find (const char substring[]) const |
int | findLastOf (const char subchar) const |
SkString & | operator= (const SkString &) |
SkString & | operator= (SkString &&) |
SkString & | operator= (const char text[]) |
char * | data () |
char & | operator[] (size_t n) |
void | reset () |
void | resize (size_t len) |
void | set (const SkString &src) |
void | set (const char text[]) |
void | set (const char text[], size_t len) |
void | set (std::string_view str) |
void | insert (size_t offset, const char text[]) |
void | insert (size_t offset, const char text[], size_t len) |
void | insert (size_t offset, const SkString &str) |
void | insert (size_t offset, std::string_view str) |
void | insertUnichar (size_t offset, SkUnichar) |
void | insertS32 (size_t offset, int32_t value) |
void | insertS64 (size_t offset, int64_t value, int minDigits=0) |
void | insertU32 (size_t offset, uint32_t value) |
void | insertU64 (size_t offset, uint64_t value, int minDigits=0) |
void | insertHex (size_t offset, uint32_t value, int minDigits=0) |
void | insertScalar (size_t offset, SkScalar) |
void | append (const char text[]) |
void | append (const char text[], size_t len) |
void | append (const SkString &str) |
void | append (std::string_view str) |
void | appendUnichar (SkUnichar uni) |
void | appendS32 (int32_t value) |
void | appendS64 (int64_t value, int minDigits=0) |
void | appendU32 (uint32_t value) |
void | appendU64 (uint64_t value, int minDigits=0) |
void | appendHex (uint32_t value, int minDigits=0) |
void | appendScalar (SkScalar value) |
void | prepend (const char text[]) |
void | prepend (const char text[], size_t len) |
void | prepend (const SkString &str) |
void | prepend (std::string_view str) |
void | prependUnichar (SkUnichar uni) |
void | prependS32 (int32_t value) |
void | prependS64 (int32_t value, int minDigits=0) |
void | prependHex (uint32_t value, int minDigits=0) |
void | prependScalar (SkScalar value) |
void | printf (const char format[],...) SK_PRINTF_LIKE(2 |
void void | printVAList (const char format[], va_list) SK_PRINTF_LIKE(2 |
void void void | appendf (const char format[],...) SK_PRINTF_LIKE(2 |
void void void void | appendVAList (const char format[], va_list) SK_PRINTF_LIKE(2 |
void void void void void | prependf (const char format[],...) SK_PRINTF_LIKE(2 |
void void void void void void | prependVAList (const char format[], va_list) SK_PRINTF_LIKE(2 |
void void void void void void void | remove (size_t offset, size_t length) |
SkString & | operator+= (const SkString &s) |
SkString & | operator+= (const char text[]) |
SkString & | operator+= (const char c) |
void | swap (SkString &other) |
Friends | |
bool | operator== (const SkString &a, const SkString &b) |
bool | operator!= (const SkString &a, const SkString &b) |
Light weight class for managing strings. Uses reference counting to make string assignments and copies very fast with no extra RAM cost. Assumes UTF8 encoding.
Definition at line 118 of file SkString.h.
using SkString::sk_is_trivially_relocatable = std::true_type |
Definition at line 244 of file SkString.h.
SkString::SkString | ( | ) |
Definition at line 289 of file SkString.cpp.
|
explicit |
Definition at line 292 of file SkString.cpp.
|
explicit |
Definition at line 296 of file SkString.cpp.
SkString::SkString | ( | const char | text[], |
size_t | len | ||
) |
Definition at line 302 of file SkString.cpp.
SkString::SkString | ( | const SkString & | src | ) |
Definition at line 306 of file SkString.cpp.
SkString::SkString | ( | SkString && | src | ) |
Definition at line 308 of file SkString.cpp.
|
explicit |
Definition at line 312 of file SkString.cpp.
|
explicit |
Definition at line 316 of file SkString.cpp.
SkString::~SkString | ( | ) |
Definition at line 320 of file SkString.cpp.
|
inline |
Definition at line 203 of file SkString.h.
|
inline |
Definition at line 204 of file SkString.h.
|
inline |
Definition at line 205 of file SkString.h.
|
inline |
Definition at line 206 of file SkString.h.
void SkString::appendf | ( | const char | format[], |
... | |||
) |
Definition at line 550 of file SkString.cpp.
|
inline |
Definition at line 212 of file SkString.h.
|
inline |
Definition at line 208 of file SkString.h.
|
inline |
Definition at line 209 of file SkString.h.
|
inline |
Definition at line 213 of file SkString.h.
|
inline |
Definition at line 210 of file SkString.h.
|
inline |
Definition at line 211 of file SkString.h.
|
inline |
Definition at line 207 of file SkString.h.
void SkString::appendVAList | ( | const char | format[], |
va_list | args | ||
) |
Definition at line 557 of file SkString.cpp.
|
inline |
Definition at line 133 of file SkString.h.
|
inline |
Definition at line 155 of file SkString.h.
|
inline |
Definition at line 152 of file SkString.h.
char * SkString::data | ( | ) |
Definition at line 363 of file SkString.cpp.
|
inline |
Definition at line 132 of file SkString.h.
|
inline |
Definition at line 149 of file SkString.h.
|
inline |
Definition at line 146 of file SkString.h.
bool SkString::equals | ( | const char | text[] | ) | const |
Definition at line 328 of file SkString.cpp.
bool SkString::equals | ( | const char | text[], |
size_t | len | ||
) | const |
Definition at line 332 of file SkString.cpp.
bool SkString::equals | ( | const SkString & | src | ) | const |
|
inline |
Definition at line 158 of file SkString.h.
|
inline |
Definition at line 161 of file SkString.h.
void SkString::insert | ( | size_t | offset, |
const char | text[] | ||
) |
Definition at line 415 of file SkString.cpp.
void SkString::insert | ( | size_t | offset, |
const char | text[], | ||
size_t | len | ||
) |
Definition at line 419 of file SkString.cpp.
|
inline |
|
inline |
Definition at line 194 of file SkString.h.
void SkString::insertHex | ( | size_t | offset, |
uint32_t | value, | ||
int | minDigits = 0 |
||
) |
Definition at line 506 of file SkString.cpp.
void SkString::insertS32 | ( | size_t | offset, |
int32_t | value | ||
) |
Definition at line 482 of file SkString.cpp.
void SkString::insertS64 | ( | size_t | offset, |
int64_t | value, | ||
int | minDigits = 0 |
||
) |
Definition at line 488 of file SkString.cpp.
void SkString::insertScalar | ( | size_t | offset, |
SkScalar | value | ||
) |
Definition at line 526 of file SkString.cpp.
void SkString::insertU32 | ( | size_t | offset, |
uint32_t | value | ||
) |
Definition at line 494 of file SkString.cpp.
void SkString::insertU64 | ( | size_t | offset, |
uint64_t | value, | ||
int | minDigits = 0 |
||
) |
Definition at line 500 of file SkString.cpp.
void SkString::insertUnichar | ( | size_t | offset, |
SkUnichar | uni | ||
) |
Definition at line 473 of file SkString.cpp.
|
inline |
Definition at line 130 of file SkString.h.
|
inline |
Definition at line 236 of file SkString.h.
|
inline |
Definition at line 235 of file SkString.h.
Definition at line 234 of file SkString.h.
SkString & SkString::operator= | ( | const char | text[] | ) |
Definition at line 353 of file SkString.cpp.
Definition at line 338 of file SkString.cpp.
Definition at line 344 of file SkString.cpp.
|
inline |
Definition at line 179 of file SkString.h.
|
inline |
Definition at line 134 of file SkString.h.
|
inline |
Definition at line 215 of file SkString.h.
|
inline |
Definition at line 216 of file SkString.h.
|
inline |
Definition at line 217 of file SkString.h.
|
inline |
Definition at line 218 of file SkString.h.
void SkString::prependf | ( | const char | format[], |
... | |||
) |
Definition at line 570 of file SkString.cpp.
|
inline |
Definition at line 222 of file SkString.h.
|
inline |
Definition at line 220 of file SkString.h.
|
inline |
Definition at line 221 of file SkString.h.
|
inline |
Definition at line 223 of file SkString.h.
|
inline |
Definition at line 219 of file SkString.h.
void SkString::prependVAList | ( | const char | format[], |
va_list | args | ||
) |
Definition at line 577 of file SkString.cpp.
void SkString::printf | ( | const char | format[], |
... | |||
) |
Definition at line 534 of file SkString.cpp.
void SkString::printVAList | ( | const char | format[], |
va_list | args | ||
) |
Definition at line 541 of file SkString.cpp.
void SkString::remove | ( | size_t | offset, |
size_t | length | ||
) |
Definition at line 592 of file SkString.cpp.
void SkString::reset | ( | ) |
Definition at line 358 of file SkString.cpp.
void SkString::resize | ( | size_t | len | ) |
String contents are preserved on resize. (For destructive resize, set(nullptr, length)
.) resize
automatically reserves an extra byte at the end of the buffer for a null terminator.
Definition at line 374 of file SkString.cpp.
void SkString::set | ( | const char | text[] | ) |
void SkString::set | ( | const char | text[], |
size_t | len | ||
) |
Definition at line 397 of file SkString.cpp.
|
inline |
Definition at line 186 of file SkString.h.
|
inline |
Definition at line 189 of file SkString.h.
|
inline |
Definition at line 131 of file SkString.h.
|
inline |
Definition at line 143 of file SkString.h.
|
inline |
Definition at line 140 of file SkString.h.
void SkString::swap | ( | SkString & | other | ) |
Swap contents between this and other. This function is guaranteed to never fail or throw.
Definition at line 619 of file SkString.cpp.
Definition at line 168 of file SkString.h.
Definition at line 165 of file SkString.h.