diff options
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(); |