From 11968f674a7de34fb7de744598a8086330cd88a3 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Fri, 25 Oct 2024 01:09:10 -0500 Subject: Get working string formatting for unsigned numbers. --- include/fud_string.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/fud_string.hpp') 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; +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; -- cgit v1.2.3