Skip to content

Commit

Permalink
Two helper methods
Browse files Browse the repository at this point in the history
These two helper methods are in some other open source libraries but we don't always include those. It bugged me enough that I added them here.

Signed-off-by: Aaron Rosenzweig <[email protected]>
  • Loading branch information
recurve committed Feb 7, 2013
1 parent e762b02 commit 3f67d56
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2789,4 +2789,15 @@ public static String cleanString(String newString, NSArray<String> toBeCleaneds)
return result;
}

public static boolean isBlank(String value) {
boolean isBlank = false;
if (value == null || value.trim().length() == 0) {
isBlank = true;
}
return isBlank;
}

public static boolean isNotBlank(String value) {
return ! isBlank(value);
}
}

0 comments on commit 3f67d56

Please sign in to comment.