Definition at line 34 of file StringView.h.
◆ StringView() [1/6]
| StringView::StringView |
( |
| ) |
|
◆ StringView() [2/6]
| StringView::StringView |
( |
const char * |
s | ) |
|
|
explicit |
◆ StringView() [3/6]
| StringView::StringView |
( |
const char * |
s, |
|
|
size_t |
length |
|
) |
| |
◆ StringView() [4/6]
| StringView::StringView |
( |
const StringView & |
other | ) |
|
◆ StringView() [5/6]
| StringView::StringView |
( |
const String & |
other | ) |
|
|
explicit |
◆ StringView() [6/6]
| StringView::StringView |
( |
const char * |
s, |
|
|
size_t |
length, |
|
|
uint32_t |
hash, |
|
|
bool |
hashingEnabled |
|
) |
| |
|
private |
◆ compare()
| bool StringView::compare |
( |
const char * |
s, |
|
|
size_t |
length |
|
) |
| const |
Perform a sized comparison on the given string. Generally this will perform better than operator==(const char *)
Definition at line 91 of file StringView.cc.
References UNLIKELY.
◆ compareHash() [1/2]
| bool StringView::compareHash |
( |
const String & |
other | ) |
const |
|
private |
◆ compareHash() [2/2]
| bool StringView::compareHash |
( |
const StringView & |
other | ) |
const |
|
private |
◆ computeHash()
| uint32_t StringView::computeHash |
( |
| ) |
const |
|
private |
◆ defaultHashingEnabled()
| bool StringView::defaultHashingEnabled |
( |
| ) |
const |
|
protectedvirtual |
◆ hash() [1/2]
| uint32_t StringView::hash |
( |
| ) |
|
◆ hash() [2/2]
| uint32_t StringView::hash |
( |
| ) |
const |
◆ length()
| size_t StringView::length |
( |
| ) |
const |
◆ nextCharacter()
| size_t StringView::nextCharacter |
( |
size_t |
i | ) |
const |
◆ operator=()
◆ operator==() [1/3]
| bool StringView::operator== |
( |
const char * |
s | ) |
const |
◆ operator==() [2/3]
| bool StringView::operator== |
( |
const String & |
s | ) |
const |
◆ operator==() [3/3]
| bool StringView::operator== |
( |
const StringView & |
s | ) |
const |
◆ operator[]()
| char StringView::operator[] |
( |
size_t |
index | ) |
const |
◆ prevCharacter()
| size_t StringView::prevCharacter |
( |
size_t |
i | ) |
const |
◆ setHashingEnable()
| void StringView::setHashingEnable |
( |
bool |
enabled | ) |
|
Set whether hashing is enabled for this StringView. Hashing makes comparisons against different strings faster, at the expense of much slower creation.
Definition at line 173 of file StringView.cc.
Referenced by substring().
◆ str()
| const char * StringView::str |
( |
| ) |
const |
◆ substring()
| StringView StringView::substring |
( |
size_t |
start, |
|
|
size_t |
end, |
|
|
bool |
hashed = HASH_STRINGVIEWS_BY_DEFAULT |
|
) |
| const |
◆ toString()
| String StringView::toString |
( |
| ) |
const |
◆ String
◆ m_Hash
| uint32_t StringView::m_Hash |
|
private |
◆ m_HashingEnabled
| bool StringView::m_HashingEnabled |
|
private |
◆ m_Length
| size_t StringView::m_Length |
|
private |
◆ m_String
| const char* StringView::m_String |
|
private |
The documentation for this class was generated from the following files: