Sese Framework
x.y.z
A cross-platform framework
|
字符串 更多...
#include <SString.h>
Public 成员函数 | |
SString () noexcept | |
SString (const char *str, size_t size) | |
SString (const SString &s_string) noexcept | |
SString (SString &&s_string) noexcept | |
~SString () noexcept override | |
size_t | cap () const |
size_t | size () const override |
void | toLower () |
将字符串转换为全小写的形式 | |
void | toUpper () |
将字符串转换为全大写的形式 | |
char * | data () |
获取 data 指针 | |
void | operator+= (const SStringView &str) |
void | operator+= (const char *u8str) |
Public 成员函数 继承自 sstr::SStringView | |
SStringView () noexcept=default | |
SStringView (const char *u8str) noexcept | |
virtual | ~SStringView ()=default |
Iterator | begin () |
Iterator | end () |
bool | null () const |
bool | empty () const |
size_t | len () const |
const char * | data () const |
int32_t | find (const SStringView &str) const |
int32_t | find (const char *u8str) const |
int32_t | findByBytes (const char *bytes) const |
SString | trim () const |
SString | reverse () const |
SString | append (const SStringView &str) const |
SString | append (const char *u8str) const |
std::vector< SString > | split (const SStringView &str) const |
std::vector< SString > | split (const char *str) const |
SString | substring (size_t begin) const |
SString | substring (size_t begin, size_t len) const |
截取子串 [begin, begin + len - 1] | |
bool | endsWith (const SStringView &suffix) const |
字符串是否以某个子串结尾 | |
bool | endsWith (const std::string_view &suffix) const |
字符串是否以某个子串结尾 | |
bool | startsWith (const SStringView &prefix) const |
字符串是否以某个子串开头 | |
bool | startsWith (const std::string_view &prefix) const |
字符串是否以某个子串开头 | |
bool | isLower () const |
字母是否为全小写 | |
bool | isUpper () const |
字母是否为全大写 | |
SString | toLower () const |
创建字母转为全小写的副本 | |
SString | toUpper () const |
创建字母转为全大写的副本 | |
SChar | at (size_t index) const |
std::vector< SChar > | toChars () const |
std::string | toString () const |
std::wstring | toWString () const |
std::unique_ptr< wchar_t[]> | toCWString () const |
SChar | operator[] (size_t index) const |
bool | operator!= (const SStringView &str) const |
bool | operator!= (const char *u8str) const |
bool | operator== (const SStringView &str) const |
bool | operator== (const char *u8str) const |
SString | operator+ (const SStringView &str) const |
SString | operator+ (const char *u8str) const |
静态 Public 成员函数 | |
static SString | fromSChars (SChar ch[], size_t size) |
static SString | fromSChars (std::vector< SChar > &chars) |
static SString | fromUTF8 (const char *str) |
static SString | fromUCS2LE (const wchar_t *str) |
Protected 属性 | |
size_t | _capacity = 0 |
Protected 属性 继承自 sstr::SStringView | |
char * | _data = nullptr |
size_t | _size = 0 |
友元 | |
class | SStringView |
字符串
|
explicitnoexcept |
SString::SString | ( | const char * | str, |
size_t | size ) |
|
noexcept |
|
noexcept |
|
overridenoexcept |
引用了 free().
|
nodiscard |
char * sstr::SString::data | ( | ) |
获取 data 指针
|
static |
|
static |
void SString::operator+= | ( | const char * | u8str | ) |
void SString::operator+= | ( | const SStringView & | str | ) |
|
nodiscardoverridevirtual |
void SString::toLower | ( | ) |
void SString::toUpper | ( | ) |
|
friend |
|
protected |