summaryrefslogtreecommitdiff
path: root/include/fud_string.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/fud_string.hpp')
-rw-r--r--include/fud_string.hpp13
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;