diff options
Diffstat (limited to 'main/src/ui/util')
-rw-r--r-- | main/src/ui/util/helper.vala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/main/src/ui/util/helper.vala b/main/src/ui/util/helper.vala index c3353fb6..4e5fbb41 100644 --- a/main/src/ui/util/helper.vala +++ b/main/src/ui/util/helper.vala @@ -272,6 +272,14 @@ public int get_only_emoji_count(string markup_text) { return emoji_no; } +public string summarize_whitespaces_to_space(string s) { + try { + return (/\s+/).replace_literal(s, -1, 0, " "); + } catch (RegexError e) { + assert_not_reached(); + } +} + public bool use_csd() { return (GLib.Application.get_default() as Application).use_csd(); } |