aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/util
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-09-10 19:11:41 +0200
committerfiaxh <fiaxh@users.noreply.github.com>2019-09-10 19:36:11 +0200
commitbd7fde99af3df59c5ec96184b2649b4308250b24 (patch)
tree49f67c73f6ecc69bb949ea81b49814c90a13f0bd /main/src/ui/util
parentd5d305193ce527f1cc3022c406de35d9a85d4ccb (diff)
downloaddino-bd7fde99af3df59c5ec96184b2649b4308250b24.tar.gz
dino-bd7fde99af3df59c5ec96184b2649b4308250b24.zip
fixup Fix some warnings
Diffstat (limited to 'main/src/ui/util')
-rw-r--r--main/src/ui/util/helper.vala8
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();
}