Commits

la...@81dbac14-341a-0410-aa85-cbcd92e6f43e  committed 0f30a7b

new method isEmpty

  • Participants
  • Parent commits e84dde0

Comments (0)

Files changed (1)

File src/java/com/opensymphony/oscache/util/StringUtil.java

     	return (s != null) && (s.length() > 0);
     }
     
+    /**
+     * @param s the string to be checked
+     * @return true if the string parameter is null or doesn't contain any element
+     * @since 2.4 
+     */
+    public static final boolean isEmpty(String s) {
+        return (s == null) || (s.length() == 0);
+    }
+    
 }