mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:37:46 +00:00
AK: Annotate StringBuilder functions as [[nodiscard]]
This commit is contained in:
parent
23454cab46
commit
7db74a6b3e
1 changed files with 6 additions and 6 deletions
|
@ -57,15 +57,15 @@ public:
|
||||||
vformat(*this, fmtstr.view(), VariadicFormatParams { parameters... });
|
vformat(*this, fmtstr.view(), VariadicFormatParams { parameters... });
|
||||||
}
|
}
|
||||||
|
|
||||||
String build() const;
|
[[nodiscard]] String build() const;
|
||||||
String to_string() const;
|
[[nodiscard]] String to_string() const;
|
||||||
ByteBuffer to_byte_buffer() const;
|
[[nodiscard]] ByteBuffer to_byte_buffer() const;
|
||||||
|
|
||||||
StringView string_view() const;
|
[[nodiscard]] StringView string_view() const;
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
size_t length() const { return m_length; }
|
[[nodiscard]] size_t length() const { return m_length; }
|
||||||
bool is_empty() const { return m_length == 0; }
|
[[nodiscard]] bool is_empty() const { return m_length == 0; }
|
||||||
void trim(size_t count) { m_length -= count; }
|
void trim(size_t count) { m_length -= count; }
|
||||||
|
|
||||||
template<class SeparatorType, class CollectionType>
|
template<class SeparatorType, class CollectionType>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue