help system
[fanfix.git] / src / jexer / bits / StringUtils.java
index 36f7b4e9b28e79e9c6175ded59bbb697b981c44d..d33f71f4e0031710e52ed008fefa0f37f28883c4 100644 (file)
@@ -472,6 +472,10 @@ public class StringUtils {
      * @return the number of text cell columns required to display this string
      */
     public static int width(final String str) {
+        if (str == null) {
+            return 0;
+        }
+
         int n = 0;
         for (int i = 0; i < str.length();) {
             int ch = str.codePointAt(i);