public final class UtilsStringChar
extends java.lang.Object
Class that provides functionality for managing strings and characters.
Project:Library for the integration with the services of @Firma, eVisor and TS@.
| Modifier and Type | Field and Description |
|---|---|
static char[] |
CHARACTERS_SET_TO_VALIDATORS
Constant attribute that represents the array with all the characters defined as constants in this class.
|
static java.lang.String |
EMPTY_STRING
Constant attribute that represents the string to identify the empty string.
|
static char |
SPECIAL_BLANK_SPACE
Constant attribute that represents the char to identify the blank space character.
|
static java.lang.String |
SPECIAL_BLANK_SPACE_STRING
Constant attribute that represents the string to identify the blank space character.
|
static char |
SPECIAL_LINE_BREAK
Constant attribute that represents the char to identify the line break character.
|
static java.lang.String |
SPECIAL_LINE_BREAK_STRING
Constant attribute that represents the string to identify the line break character.
|
static char |
SPECIAL_LINE_START
Constant attribute that represents the char to identify the line start character.
|
static java.lang.String |
SPECIAL_LINE_START_STRING
Constant attribute that represents the string to identify the line start character.
|
static java.lang.String |
SPECIAL_SYSTEM_LINE_SEPARATOR_STRING
Constant attribute that represents the string to identify the line separator character in this system.
|
static char |
SPECIAL_TABULATION
Constant attribute that represents the char to identify the tabulation character.
|
static java.lang.String |
SPECIAL_TABULATION_STRING
Constant attribute that represents the string to identify the tabulation character.
|
static char |
SYMBOL_AMPERSAND
Constant attribute that represents the char to identify the symbol:
&. |
static java.lang.String |
SYMBOL_AMPERSAND_STRING
Constant attribute that represents the string to identify the symbol:
&. |
static char |
SYMBOL_ASTERISK
Constant attribute that represents the char to identify the symbol:
*. |
static java.lang.String |
SYMBOL_ASTERISK_STRING
Constant attribute that represents the string to identify the symbol:
*. |
static char |
SYMBOL_CLOSE_BRACKET
Constant attribute that represents the char to identify the symbol:
). |
static java.lang.String |
SYMBOL_CLOSE_BRACKET_STRING
Constant attribute that represents the string to identify the symbol:
). |
static char |
SYMBOL_CLOSE_SQUARE_BRACKET
Constant attribute that represents the char to identify the symbol:
]. |
static java.lang.String |
SYMBOL_CLOSE_SQUARE_BRACKET_STRING
Constant attribute that represents the string to identify the symbol:
]. |
static char |
SYMBOL_COLON
Constant attribute that represents the char to identify the symbol:
:. |
static java.lang.String |
SYMBOL_COLON_STRING
Constant attribute that represents the string to identify the symbol:
:. |
static char |
SYMBOL_COMMA
Constant attribute that represents the char to identify the symbol:
,. |
static java.lang.String |
SYMBOL_COMMA_STRING
Constant attribute that represents the string to identify the symbol:
,. |
static char |
SYMBOL_DOT
Constant attribute that represents the char to identify the symbol:
. |
static java.lang.String |
SYMBOL_DOT_STRING
Constant attribute that represents the string to identify the symbol:
. |
static char |
SYMBOL_EQUAL
Constant attribute that represents the char to identify the symbol:
=. |
static java.lang.String |
SYMBOL_EQUAL_STRING
Constant attribute that represents the string to identify the symbol:
=. |
static char |
SYMBOL_ESCAPED_BACKSLASH
Constant attribute that represents the char to identify the symbol:
\. |
static java.lang.String |
SYMBOL_ESCAPED_BACKSLASH_STRING
Constant attribute that represents the string to identify the symbol:
\. |
static char |
SYMBOL_HYPHEN
Constant attribute that represents the char to identify the symbol:
-. |
static java.lang.String |
SYMBOL_HYPHEN_STRING
Constant attribute that represents the string to identify the symbol:
-. |
static char |
SYMBOL_OPEN_BRACKET
Constant attribute that represents the char to identify the symbol:
(. |
static java.lang.String |
SYMBOL_OPEN_BRACKET_STRING
Constant attribute that represents the string to identify the symbol:
(. |
static char |
SYMBOL_OPEN_SQUARE_BRACKET
Constant attribute that represents the char to identify the symbol:
[. |
static java.lang.String |
SYMBOL_OPEN_SQUARE_BRACKET_STRING
Constant attribute that represents the string to identify the symbol:
[. |
static char |
SYMBOL_PAD
Constant attribute that represents the char to identify the symbol:
#. |
static java.lang.String |
SYMBOL_PAD_STRING
Constant attribute that represents the string to identify the symbol:
#. |
static char |
SYMBOL_PIPE
Constant attribute that represents the char to identify the symbol:
|. |
static java.lang.String |
SYMBOL_PIPE_STRING
Constant attribute that represents the string to identify the symbol:
|. |
static char |
SYMBOL_QUESTION_MARK
Constant attribute that represents the char to identify the symbol:
? |
static java.lang.String |
SYMBOL_QUESTION_MARK_STRING
Constant attribute that represents the string to identify the symbol:
? |
static char |
SYMBOL_SEMICOLON
Constant attribute that represents the char to identify the symbol:
;. |
static java.lang.String |
SYMBOL_SEMICOLON_STRING
Constant attribute that represents the string to identify the symbol:
;. |
static char |
SYMBOL_SLASH
Constant attribute that represents the char to identify the symbol:
/. |
static java.lang.String |
SYMBOL_SLASH_STRING
Constant attribute that represents the string to identify the symbol:
/. |
| Modifier and Type | Method and Description |
|---|---|
static void |
cleanStringBuilder(java.lang.StringBuilder sb)
To free resources, this method sets the length of the input
StringBuilder to
zero and then trim it. |
static boolean |
containsSomeOfTheCharacterSet(java.lang.String str)
Method that checks whether a string contains some of the characters contained in
CHARACTERS_SET_TO_VALIDATORS (true) or not (false). |
static boolean |
containsSomeOfTheCharacterSetInTheSet(java.lang.String str,
char[] characterSet)
Method that checks whether a string contains some of the characters contained in certain characters array (true) or not (false).
|
static boolean |
isNullOrEmpty(java.lang.String str)
Method that checks whether a string is null or empty.
|
static boolean |
isNullOrEmptyTrim(java.lang.String str)
Method that checks whether a string is null or empty after to apply the method
String.trim() on. |
static java.lang.String |
removeBlanksFromString(java.lang.String string)
Removes all the blanks from the input string.
|
public static final java.lang.String EMPTY_STRING
public static final char SPECIAL_BLANK_SPACE
public static final java.lang.String SPECIAL_BLANK_SPACE_STRING
public static final java.lang.String SPECIAL_SYSTEM_LINE_SEPARATOR_STRING
public static final char SPECIAL_LINE_BREAK
public static final java.lang.String SPECIAL_LINE_BREAK_STRING
public static final char SPECIAL_LINE_START
public static final java.lang.String SPECIAL_LINE_START_STRING
public static final char SPECIAL_TABULATION
public static final java.lang.String SPECIAL_TABULATION_STRING
public static final char SYMBOL_PAD
#.public static final java.lang.String SYMBOL_PAD_STRING
#.public static final char SYMBOL_AMPERSAND
&.public static final java.lang.String SYMBOL_AMPERSAND_STRING
&.public static final char SYMBOL_COLON
:.public static final java.lang.String SYMBOL_COLON_STRING
:.public static final char SYMBOL_SEMICOLON
;.public static final java.lang.String SYMBOL_SEMICOLON_STRING
;.public static final char SYMBOL_EQUAL
=.public static final java.lang.String SYMBOL_EQUAL_STRING
=.public static final char SYMBOL_HYPHEN
-.public static final java.lang.String SYMBOL_HYPHEN_STRING
-.public static final char SYMBOL_COMMA
,.public static final java.lang.String SYMBOL_COMMA_STRING
,.public static final char SYMBOL_DOT
..public static final java.lang.String SYMBOL_DOT_STRING
..public static final char SYMBOL_SLASH
/.public static final java.lang.String SYMBOL_SLASH_STRING
/.public static final char SYMBOL_QUESTION_MARK
?.public static final java.lang.String SYMBOL_QUESTION_MARK_STRING
?.public static final char SYMBOL_ESCAPED_BACKSLASH
\.public static final java.lang.String SYMBOL_ESCAPED_BACKSLASH_STRING
\.public static final char SYMBOL_OPEN_SQUARE_BRACKET
[.public static final java.lang.String SYMBOL_OPEN_SQUARE_BRACKET_STRING
[.public static final char SYMBOL_CLOSE_SQUARE_BRACKET
].public static final java.lang.String SYMBOL_CLOSE_SQUARE_BRACKET_STRING
].public static final char SYMBOL_OPEN_BRACKET
(.public static final java.lang.String SYMBOL_OPEN_BRACKET_STRING
(.public static final char SYMBOL_CLOSE_BRACKET
).public static final java.lang.String SYMBOL_CLOSE_BRACKET_STRING
).public static final char SYMBOL_ASTERISK
*.public static final java.lang.String SYMBOL_ASTERISK_STRING
*.public static final char SYMBOL_PIPE
|.public static final java.lang.String SYMBOL_PIPE_STRING
|.public static final char[] CHARACTERS_SET_TO_VALIDATORS
public static boolean isNullOrEmpty(java.lang.String str)
str - Parameter that represents the string to process.true value whether the string is null or empty, or false value in another case.public static boolean isNullOrEmptyTrim(java.lang.String str)
String.trim() on.str - Parameter that represents the string to process.true value whether the string is null or empty, or false value in another case.public static boolean containsSomeOfTheCharacterSet(java.lang.String str)
CHARACTERS_SET_TO_VALIDATORS (true) or not (false).str - Parameter that represents the string to process.CHARACTERS_SET_TO_VALIDATORS
(true) or not (false).public static boolean containsSomeOfTheCharacterSetInTheSet(java.lang.String str,
char[] characterSet)
str - Parameter that represents the string to process.characterSet - Parameter that represents the characters array to process.public static void cleanStringBuilder(java.lang.StringBuilder sb)
StringBuilder to
zero and then trim it.sb - String builder to clean. If it is null, this method do nothing.public static java.lang.String removeBlanksFromString(java.lang.String string)
SPECIAL_BLANK_SPACE_STRING, SPECIAL_LINE_BREAK_STRING,
SPECIAL_LINE_START_STRING and SPECIAL_TABULATION_STRING.string - String from what removes the blanks.null, otherwise, the same input
string after removes the blanks.