diff --git a/srcs/juloo.keyboard2/Utils.java b/srcs/juloo.keyboard2/Utils.java index 28bd9e3..0eee945 100644 --- a/srcs/juloo.keyboard2/Utils.java +++ b/srcs/juloo.keyboard2/Utils.java @@ -12,6 +12,8 @@ class Utils /** Turn the first letter of a string uppercase. */ public static String capitalize_string(String s) { + if (s.length() < 1) + return s; // Make sure not to cut a code point in half int i = s.offsetByCodePoints(0, 1); return s.substring(0, i).toUpperCase() + s.substring(i);