diff options
author | Dominick Allen <djallen@librehumanitas.org> | 2024-11-10 15:14:54 -0600 |
---|---|---|
committer | Dominick Allen <djallen@librehumanitas.org> | 2024-11-10 15:14:54 -0600 |
commit | 012df4bc38777c9053353ec2c4213bba67d63ab4 (patch) | |
tree | 4267c0cd4a7ed61119a44b31f0fc8b8adff2b4cf /include/fud_string.hpp | |
parent | 1e89700693e92bb9c78ace739c71431b74d91e22 (diff) |
Buffered file IO.
Diffstat (limited to 'include/fud_string.hpp')
-rw-r--r-- | include/fud_string.hpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/include/fud_string.hpp b/include/fud_string.hpp index 935e1c1..a20b067 100644 --- a/include/fud_string.hpp +++ b/include/fud_string.hpp @@ -307,22 +307,31 @@ class String { * length is greater than zero. */ Option<utf8> pop(); + /** \brief Append a C string to the back of the string, growing it as necessary. */ FudStatus append(const char* source); + /** \brief Append a String to the back of the string, growing it as necessary. */ FudStatus append(const String& source); + /** \brief Append a StringView to the back of the string, growing it as necessary. */ FudStatus append(StringView source); + /** \brief Create a new string with the contents of this string and rhs. */ + [[nodiscard]] StringResult catenate(const String& rhs) const; + + /** \@copydoc String::catenate(const String& rhs) const */ + [[nodiscard]] StringResult catenate(const char* rhs) const; + + /** \brief Insert as much of source into the string as possible, returning + * how many bytes and the status of the insertion. */ DrainResult drain(const char* source); + /** @copydoc String::drain(const char* source) */ DrainResult drain(const String& source); + /** @copydoc String::drain(const char* 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(); |