summaryrefslogtreecommitdiff
path: root/include/fud_string.hpp
diff options
context:
space:
mode:
authorDominick Allen <djallen@librehumanitas.org>2024-11-03 13:04:00 -0600
committerDominick Allen <djallen@librehumanitas.org>2024-11-03 13:04:00 -0600
commit1e89700693e92bb9c78ace739c71431b74d91e22 (patch)
tree08d40bf1c650987fac55805ce4b930a19c065fec /include/fud_string.hpp
parent9b4b87765d48d2d6aed6ac1f40c4aa2684fad766 (diff)
Rename FudUtf8 to Utf8.
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);