Package com.fedapay.utile
Class StringUtils
- java.lang.Object
-
- com.fedapay.utile.StringUtils
-
public final class StringUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description StringUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancontainsWhitespace(String str)Checks whether a string contains any whitespace characters or not.static booleansecureCompare(String a, String b)Compares two strings for equality.static StringtoSnakeCase(String str)Converts the string to snake case.
-
-
-
Method Detail
-
containsWhitespace
public static boolean containsWhitespace(String str)
Checks whether a string contains any whitespace characters or not.- Parameters:
str- the string to check.- Returns:
trueif the string contains any whitespace characters; otherwise,false.
-
secureCompare
public static boolean secureCompare(String a, String b)
Compares two strings for equality. The time taken is independent of the number of characters that match.- Parameters:
a- one of the strings to compare.b- the other string to compare.- Returns:
- true if the strings are equal, false otherwise.
-
-