From 5b09c8e652756f8b631fc3e5b6d72a3df3e4faa3 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Fri, 12 Jan 2018 10:21:53 +0200 Subject: Handle surrogate pairs in avatars --- include/Utils.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/Utils.h') diff --git a/include/Utils.h b/include/Utils.h index 183ebbbe..bbe46dd8 100644 --- a/include/Utils.h +++ b/include/Utils.h @@ -17,4 +17,9 @@ descriptiveTime(const QDateTime &then); //! in the RoomList. DescInfo getMessageDescription(const TimelineEvent &event, const QString &localUser); + +//! Get the first character of a string, taking into account that +//! surrogate pairs might be in use. +QString +firstChar(const QString &input); } -- cgit 1.5.1