public class FlowableExpressionStringUtils extends Object
FlowableExpressionFormatUtils
.Constructor and Description |
---|
FlowableExpressionStringUtils() |
Modifier and Type | Method and Description |
---|---|
String |
capitalize(String text)
Capitalizes a text, i.e.
|
String |
carriageReturn()
Returns a carriage return character (\r)
|
boolean |
contains(String text,
String otherText)
Checks if a strings contains another string.
|
boolean |
containsIgnoreCase(String text,
String otherText)
Checks if a strings contains another string ignoring the case.
|
boolean |
equals(String text,
String otherText)
Checks if two strings are the same.
|
boolean |
equalsIgnoreCase(String text,
String otherText)
Checks if two strings are the same without taking capitalization into account.
|
String |
escapeHtml(String text)
Escapes the characters in a
String using HTML entities. |
boolean |
hasText(String text)
Checks whether a string contains text (is not null, empty)
|
String |
join(Collection<String> collection,
String delimiter)
Concatenates all entries of a list or collection to a single string.
|
boolean |
matches(String text,
String regularExpression)
Checks whether a text matches a regular expression.
|
String |
newline()
Returns a newline/linefeed character (\n)
|
List<String> |
split(String text,
String delimiter)
Splits a text into a collection with a given delimiter.
|
String |
substring(String text,
int from,
int to)
Gets all text between a character range.
|
String |
substringFrom(String text,
int from)
Gets all text behind a certain character.
|
String |
toLowerCase(String text)
Turns all letters of a text to lowercase.
|
String |
toUpperCase(String text)
Turns all letters of a text to uppercase.
|
String |
trimWhitespace(String text)
Deletes all whitespaces from a text
|
String |
unescapeHtml(String text)
Unescapes a
String containing entity escapes to a string containing the actual Unicode characters corresponding to the escapes. |
public String toUpperCase(String text)
text
- The text to be converted to uppercasepublic String toLowerCase(String text)
text
- The text to be converted to lowercasepublic String capitalize(String text)
text
- The text to be capitalizedpublic String trimWhitespace(String text)
text
- The text to be trimmedpublic boolean hasText(String text)
text
- The text to be checkedpublic boolean contains(String text, String otherText)
text
- The text to be checkedotherText
- The text that should be contained within the first textotherText
is part of text
.public boolean containsIgnoreCase(String text, String otherText)
text
- The text to be checkedotherText
- The text that should be contained within the first textotherText
is part of text
.public boolean matches(String text, String regularExpression)
text
- The text to checkregularExpression
- The regular expression to check the text againstpublic boolean equals(String text, String otherText)
text
- The first textotherText
- The second textpublic boolean equalsIgnoreCase(String text, String otherText)
text
- The first textotherText
- The second textpublic String substring(String text, int from, int to)
text
- The original textfrom
- The offset from the start beginning at 0to
- The offset from the end beginning at 0public String substringFrom(String text, int from)
text
- The original textfrom
- The character offset beginning at 0public List<String> split(String text, String delimiter)
text
- The text to be splitdelimiter
- The splitter to be usedpublic String join(Collection<String> collection, String delimiter)
collection
- A collection, list or any other iterable objectdelimiter
- The separator between the entries, e.g. ", " or " and "public String newline()
public String carriageReturn()
public String unescapeHtml(String text)
String
containing entity escapes to a string containing the actual Unicode characters corresponding to the escapes.
For instance, in a text containing the character '™' would be unescaped to '™'.text
- The text to be unescaped