Package org.htmlunit.cyberneko.util
Class StringUtils
- java.lang.Object
-
- org.htmlunit.cyberneko.util.StringUtils
-
public final class StringUtils extends Object
String utilities class for utility functions not covered by third party libraries.- Author:
- Ronald Brill
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanequalsChar(char expected, CharSequence s)static booleanisEmptyString(CharSequence s)Returns true if the param is not null and empty.
-
-
-
Method Detail
-
isEmptyString
public static boolean isEmptyString(CharSequence s)
Returns true if the param is not null and empty. This is different from org.apache.commons.lang3.StringUtils#isEmpty(CharSequence) because this returns false if the provided string is null.- Parameters:
s- the string to check- Returns:
- true if the param is not null and empty
-
equalsChar
public static boolean equalsChar(char expected, CharSequence s)- Parameters:
expected- the char that we expects- the string to check- Returns:
- true if the provided string has only one char and this matches the expectation
-
-