public class TextTools
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String[] |
resources
The Constant resources.
|
| Constructor and Description |
|---|
TextTools() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addAfterSpacer(java.lang.StringBuffer sb,
java.lang.String string,
java.lang.String spacer)
Adds the after spacer.
|
static java.lang.String |
getSignAndDigits(java.lang.CharSequence cs)
Returns the optional minus sign and all digits from the left of the incoming CharSequence
and ignores other characters that are not digits.
|
static java.lang.String |
htmlToText(java.lang.String inputHTML)
Very simple transformation between HTML and Text.
|
static java.lang.String |
lowerFirstWord(java.lang.String inputStr)
Lower first word.
|
static java.lang.String |
md5(java.lang.String source)
Compute md5 of the input text.
|
static java.lang.String |
pluralize(java.lang.String text,
double days)
Pluralize.
|
static java.lang.String |
reencodeText(java.lang.String possibleHTMLtext)
Re encode a text string according with the rules defined in the EFM.
|
static java.lang.String |
textToHTML(java.lang.String inputStr)
Very simple transformation of a text string with carrier returns into an HTML text with
<br/> separators.
31/05/2012, now the encoding of < into < and > into > and & into & is supported.
|
static java.lang.String |
textToHTMLtext(java.lang.String string)
This is the surrounding method behind
textToHTML(String). |
static java.lang.String |
upperFirstLetter(java.lang.String string)
Simple text transformation to capitalize the first letter in the string.
|
public static java.lang.String lowerFirstWord(java.lang.String inputStr)
inputStr - the input strpublic static java.lang.String textToHTML(java.lang.String inputStr)
inputStr - input string as text.public static java.lang.String textToHTMLtext(java.lang.String string)
textToHTML(String).string - the stringtextToHTML(String)public static java.lang.String htmlToText(java.lang.String inputHTML)
inputHTML - the input htmlpublic static java.lang.String upperFirstLetter(java.lang.String string)
string - the stringpublic static java.lang.String pluralize(java.lang.String text,
double days)
text - the textdays - the dayspublic static void addAfterSpacer(java.lang.StringBuffer sb,
java.lang.String string,
java.lang.String spacer)
sb - the sbstring - the stringspacer - the spacerpublic static java.lang.String getSignAndDigits(java.lang.CharSequence cs)
cs - the cspublic static java.lang.String reencodeText(java.lang.String possibleHTMLtext)
possibleHTMLtext - the possible htm ltextpublic static java.lang.String md5(java.lang.String source)
source - the input text