Sese Framework
x.y.z
A cross-platform framework
|
线程安全的字符串缓存类 更多...
#include <StringBuffer.h>
Public 类型 | |
using | Ptr = std::unique_ptr<StringBuffer> |
Public 成员函数 | |
StringBuffer (size_t cap=STRING_BUFFER_SIZE_FACTOR) noexcept | |
StringBuffer (const char *str) noexcept | |
void | append (char ch) noexcept override |
void | append (const char *str) noexcept override |
void | append (const std::string &str) noexcept override |
void | append (const std::string_view &str) noexcept override |
void | append (const String &str) noexcept override |
void | append (const StringView &str) noexcept override |
void | append (const char *data, size_t length) noexcept override |
size_t | length () noexcept |
size_t | size () noexcept |
bool | empty () noexcept |
void | clear () noexcept override |
void | reverse () noexcept override |
char | getCharAt (int index) |
bool | setChatAt (int index, char ch) override |
bool | delCharAt (int index) override |
bool | del (int start, int len) override |
bool | insertAt (int index, const char *str) override |
bool | insertAt (int index, const std::string &str) override |
bool | insertAt (int index, const std::string_view &str) override |
bool | insertAt (int index, const String &str) override |
bool | insertAt (int index, const StringView &str) override |
void | trim () noexcept override |
去除两端空格 | |
std::vector< std::string > | split (const std::string &str) noexcept |
bool | startsWith (const std::string_view &prefix) noexcept |
bool | endsWith (const std::string_view &suffix) noexcept |
std::string | toString () override |
String | toSString () override |
Private 成员函数 | |
virtual bool | empty () const noexcept |
virtual char | getCharAt (int index) const |
virtual size_t | length () const noexcept |
virtual size_t | size () const noexcept |
virtual std::vector< std::string > | split (const std::string_view &str) const noexcept |
Private 成员函数 继承自 sese::text::AbstractStringBuffer | |
AbstractStringBuffer (size_t cap=STRING_BUFFER_SIZE_FACTOR) noexcept | |
AbstractStringBuffer (const char *str) noexcept | |
以字符串为初始化参数 | |
virtual | ~AbstractStringBuffer () noexcept |
AbstractStringBuffer (const AbstractStringBuffer &abstract_string_buffer) noexcept | |
AbstractStringBuffer (AbstractStringBuffer &&abstract_string_buffer) noexcept | |
virtual bool | startsWith (const std::string_view &prefix) const noexcept |
virtual bool | endsWith (const std::string_view &suffix) const noexcept |
virtual void * | buf () |
void | expansion (size_t new_size) noexcept |
字符串缓存 | |
bool | insertAt (int index, const char *data, size_t len) |
静态 Private 成员函数 | |
static std::vector< std::string > | split (const std::string_view &text, const std::string_view &sub) noexcept |
静态 Private 成员函数 继承自 sese::text::AbstractStringBuffer | |
static std::vector< std::string > | split (const std::string_view &text, const std::string_view &sub) noexcept |
static bool | startsWith (const std::string_view &text, const std::string_view &prefix) noexcept |
static bool | endsWith (const std::string_view &text, const std::string_view &suffix) noexcept |
Private 属性 | |
std::mutex | mutex |
Private 属性 继承自 sese::text::AbstractStringBuffer | |
size_t | cap {} |
size_t | len = 0 |
实际容量 | |
char * | buffer = nullptr |
字符串长度 | |
线程安全的字符串缓存类
using sese::text::StringBuffer::Ptr = std::unique_ptr<StringBuffer> |
|
explicitnoexcept |
|
explicitnoexcept |
|
overridevirtualnoexcept |
重载 sese::text::AbstractStringBuffer .
被这些函数引用 operator<<(), operator<<(), operator<<(), operator<<(), operator<<() , 以及 operator<<().
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtual |
|
overridevirtual |
|
inlinenodiscardprivatevirtualnoexcept |
|
nodiscardnoexcept |
|
nodiscardnoexcept |
|
nodiscard |
|
nodiscardprivatevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
inlinenodiscardprivatevirtualnoexcept |
|
nodiscardnoexcept |
|
overridevirtualnoexcept |
|
overridevirtual |
|
inlinenodiscardprivatevirtualnoexcept |
|
nodiscardnoexcept |
|
nodiscardnoexcept |
|
nodiscardprivatevirtualnoexcept |
|
staticprivatenoexcept |
|
nodiscardnoexcept |
|
overridevirtual |
|
overridevirtual |
|
overridevirtualnoexcept |
|
private |
被这些函数引用 clear().