summary refs log tree commit diff
path: root/src/Utils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Utils.cc')
-rw-r--r--src/Utils.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Utils.cc b/src/Utils.cc
index 663f7196..9d575c09 100644
--- a/src/Utils.cc
+++ b/src/Utils.cc
@@ -119,3 +119,12 @@ utils::getMessageDescription(const TimelineEvent &event, const QString &localUse
 
         return DescInfo{};
 }
+
+QString
+utils::firstChar(const QString &input)
+{
+        if (!input.isEmpty())
+                return QString::fromUcs4(&input.toUcs4().at(0), 1);
+
+        return input;
+}