public class StripeTextUtils
extends java.lang.Object
| Constructor and Description |
|---|
StripeTextUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isBlank(java.lang.String value)
A checker for whether or not the input value is entirely whitespace.
|
static java.lang.String |
nullIfBlank(java.lang.String value)
Swap
null for blank text values. |
static java.lang.String |
removeSpacesAndHyphens(java.lang.String cardNumberWithSpaces)
Converts a card number that may have spaces between the numbers into one without any spaces.
|
public static java.lang.String nullIfBlank(java.lang.String value)
null for blank text values.value - an input string that may or may not be entirely whitespacenull if the string is entirely whitespace, otherwise the input valuepublic static boolean isBlank(java.lang.String value)
null or "".value - a possibly blank input string valuetrue if and only if the value is all whitespace, null, or emptypublic static java.lang.String removeSpacesAndHyphens(java.lang.String cardNumberWithSpaces)
cardNumberWithSpaces - a card number, for instance "4242 4242 4242 4242"null if the input was null or all spaces.