public class Strings
extends java.lang.Object
Constructor and Description |
---|
Strings() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
addAsteriscsFromAnArray(java.lang.String array)
This method creates an String of words (blanck separated)
enveloped by asteriscs: Example
"This is an example" returns
"*This* *is* *an* *example*"
|
static java.util.Vector |
allWordForms(java.lang.String str,
boolean withAccents)
This method returns all the forms than can have a
word to do an advanced search.
|
static boolean |
find(java.lang.String pattern,
java.lang.String[] array)
Find a pattern into one array
|
static java.lang.String |
getBlankSeparated(java.lang.String[] input)
returns a list (blanck-separated) in one unique string
|
static java.lang.String |
getComaSeparated(java.lang.String[] input)
returns a list (comma-separated) in one unique string
|
static java.lang.String |
getUperCaseFirst(java.lang.String str)
It returns an string with the firs chacarter in UperCase
|
static java.lang.String[] |
join(java.lang.String[] s1,
java.lang.String[] s2)
This function joins two strings
|
static java.lang.String |
removeAccents(java.lang.String str)
This method remove all the string accents
|
static java.lang.String |
replace(java.lang.String str,
java.lang.String pattern,
java.lang.String replace)
Replace a part of a String
|
static java.util.TreeMap |
separateParams(java.lang.String pairValues)
Creates a TreeMap froma KVP
|
static java.lang.String |
tryIfIsNumber(java.lang.String str,
int charNumber)
This function is used to try if a string is a number.
|
public static java.lang.String replace(java.lang.String str, java.lang.String pattern, java.lang.String replace)
str
- String to find the patternpattern
- Pattern to findreplace
- String to replacepublic static boolean find(java.lang.String pattern, java.lang.String[] array)
pattern
- array
- public static java.lang.String[] join(java.lang.String[] s1, java.lang.String[] s2)
s1
- s2
- public static java.lang.String getComaSeparated(java.lang.String[] input)
input
- public static java.lang.String getBlankSeparated(java.lang.String[] input)
input
- public static java.lang.String addAsteriscsFromAnArray(java.lang.String array)
array
- Input Stringpublic static java.lang.String tryIfIsNumber(java.lang.String str, int charNumber)
str
- Input StringcharNumber
- Number of chars that must be triedpublic static java.lang.String removeAccents(java.lang.String str)
str
- Input Stringpublic static java.util.Vector allWordForms(java.lang.String str, boolean withAccents)
str
- Input stringpublic static java.lang.String getUperCaseFirst(java.lang.String str)
str
- Input strpublic static java.util.TreeMap separateParams(java.lang.String pairValues)
pairValues
- KVP string