41 using Ptr = std::unique_ptr<StringBuffer>;
47 void append(
char ch)
noexcept override;
48 void append(
const char *str)
noexcept override;
49 void append(
const std::string &str)
noexcept override;
50 void append(
const std::string_view &str)
noexcept override;
53 void append(
const char *data,
size_t length)
noexcept override;
54 [[nodiscard]]
size_t length() noexcept;
55 [[nodiscard]]
size_t size() noexcept;
56 [[nodiscard]]
bool empty() noexcept;
57 void clear() noexcept override;
58 void reverse() noexcept override;
60 bool setChatAt(
int index,
char ch) override;
62 bool del(
int start,
int len) override;
63 bool insertAt(
int index, const
char *str) override;
64 bool insertAt(
int index, const std::
string &str) override;
65 bool insertAt(
int index, const std::string_view &str) override;
68 void trim() noexcept override;
69 [[nodiscard]] std::vector<std::
string>
split(const std::
string &str) noexcept;
70 [[nodiscard]]
bool startsWith(const std::string_view &prefix) noexcept;
71 [[nodiscard]]
bool endsWith(const std::string_view &suffix) noexcept;