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.hpp11
1 files changed, 10 insertions, 1 deletions
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<utf8> front();
+
/** \brief Returns the last character in the sequence if the length is
* greater than zero. */
[[nodiscard]] Option<utf8> 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<utf8> pop();
FudStatus append(const char* source);