From 1e89700693e92bb9c78ace739c71431b74d91e22 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Sun, 3 Nov 2024 13:04:00 -0600 Subject: Rename FudUtf8 to Utf8. --- include/fud_string.hpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include/fud_string.hpp') diff --git a/include/fud_string.hpp b/include/fud_string.hpp index 86261c4..935e1c1 100644 --- a/include/fud_string.hpp +++ b/include/fud_string.hpp @@ -286,16 +286,25 @@ class String { /** \brief Attempts to reserve newCapacity bytes of storage. */ FudStatus reserve(size_t newCapacity); + /** \brief Returns the first character in the sequence if the length is + * greater than zero. */ + [[nodiscard]] Option front(); + /** \brief Returns the last character in the sequence if the length is * greater than zero. */ [[nodiscard]] Option back(); + /** \brief Append a character to the back of the string, growing it if necessary. */ FudStatus pushBack(char letter); + /** @copydoc String::pushBack(char letter) */ FudStatus pushBack(utf8 letter); - FudStatus pushBack(const FudUtf8& letter); + /** @copydoc String::pushBack(char letter) */ + FudStatus pushBack(const Utf8& letter); + /** \brief Pop and return a character from the back of the string if its + * length is greater than zero. */ Option pop(); FudStatus append(const char* source); -- cgit v1.2.3