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