Added isBlank(), deprecated blank().
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1730 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -54,8 +54,18 @@ public class StringUtil
|
||||
{
|
||||
/**
|
||||
* @return true if the string is null or empty, false otherwise.
|
||||
*
|
||||
* @deprecated use isBlank instead.
|
||||
*/
|
||||
public static boolean blank (String value)
|
||||
{
|
||||
return isBlank(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if the string is null or empty, false otherwise.
|
||||
*/
|
||||
public static boolean isBlank (String value)
|
||||
{
|
||||
return (value == null || value.trim().length() == 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user