summaryrefslogtreecommitdiff
path: root/src/lq/Strings.java
blob: 42d23e5efee8ec33b4a61a75552a8342e433b67e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package lq;

public class Strings {
    public static final String escape(String raw) {
        return raw
            .replaceAll("&","&")
            .replaceAll("<","&lt;")
            .replaceAll(">","&gt;")
            .replaceAll("  ","&nbsp;&nbsp;");
    }

    public static final boolean nullOrEmpty(String str) {
      return str == null || str.isEmpty();
    }
}