diff options
author | Dominick Allen <djallen@librehumanitas.org> | 2024-10-25 01:09:10 -0500 |
---|---|---|
committer | Dominick Allen <djallen@librehumanitas.org> | 2024-10-25 01:09:10 -0500 |
commit | 11968f674a7de34fb7de744598a8086330cd88a3 (patch) | |
tree | be5b885ef47c8ceab50f558c8aef6632fefc94d1 /include/fud_string.hpp | |
parent | 512d026de016f2720060d264adec02e56123851d (diff) |
Get working string formatting for unsigned numbers.
Diffstat (limited to 'include/fud_string.hpp')
-rw-r--r-- | include/fud_string.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/fud_string.hpp b/include/fud_string.hpp index 60a328f..0213524 100644 --- a/include/fud_string.hpp +++ b/include/fud_string.hpp @@ -38,6 +38,11 @@ constexpr size_t SSO_BUF_SIZE = SSO_BUF_LENGTH + 1; using StringResult = Result<String, FudStatus>; +struct DrainResult { + size_t bytesWritten; + FudStatus status; +}; + class String { public: static StringResult makeFromCString(const char* cString); @@ -212,12 +217,20 @@ class String { FudStatus append(StringView source); + DrainResult drain(const char* source); + + DrainResult drain(const String& source); + + DrainResult drain(StringView source); + [[nodiscard]] StringResult catenate(const String& rhs) const; [[nodiscard]] StringResult catenate(const char* rhs) const; [[nodiscard]] bool compare(const String& rhs) const; + FudStatus clear(); + const utf8* begin() const; const utf8* end() const; |