public class StringUtil_IW
extends Object
Modifier and Type | Method and Description |
---|---|
String |
add(String s,
String add) |
String |
add(String s,
String add,
String delimiter) |
String |
add(String s,
String add,
String delimiter,
boolean allowDuplicates) |
String |
appendParentheticalSuffix(String s,
int suffix) |
String |
appendParentheticalSuffix(String s,
String suffix) |
String |
bytesToHexString(byte[] bytes) |
boolean |
contains(String s,
String text) |
boolean |
contains(String s,
String text,
String delimiter) |
boolean |
containsIgnoreCase(String s,
String text) |
boolean |
containsIgnoreCase(String s,
String text,
String delimiter) |
int |
count(String s,
char c) |
int |
count(String s,
int start,
int end,
char c) |
int |
count(String s,
int start,
int end,
String text) |
int |
count(String s,
String text) |
boolean |
endsWith(String s,
char end) |
boolean |
endsWith(String s,
String end) |
boolean |
equals(String s1,
String s2) |
boolean |
equalsIgnoreBreakLine(String s1,
String s2) |
boolean |
equalsIgnoreCase(String s1,
String s2) |
String |
extract(String s,
char[] chars)
Deprecated.
As of 7.0.0, with no direct replacement
|
String |
extractChars(String s) |
String |
extractDigits(String s) |
String |
extractFirst(String s,
char delimiter) |
String |
extractFirst(String s,
String delimiter) |
String |
extractLast(String s,
char delimiter) |
String |
extractLast(String s,
String delimiter) |
String |
extractLeadingDigits(String s) |
static StringUtil_IW |
getInstance() |
String |
highlight(String s,
String[] queryTerms)
Deprecated.
|
String |
highlight(String s,
String[] queryTerms,
String highlight1,
String highlight2)
Deprecated.
|
int |
indexOfAny(String s,
char[] chars) |
int |
indexOfAny(String s,
char[] chars,
int fromIndex) |
int |
indexOfAny(String s,
char[] chars,
int fromIndex,
int toIndex) |
int |
indexOfAny(String s,
String[] texts) |
int |
indexOfAny(String s,
String[] texts,
int fromIndex) |
int |
indexOfAny(String s,
String[] texts,
int fromIndex,
int toIndex) |
String |
insert(String s,
String insert,
int offset) |
boolean |
isLowerCase(String s) |
boolean |
isUpperCase(String s) |
int |
lastIndexOfAny(String s,
char[] chars) |
int |
lastIndexOfAny(String s,
char[] chars,
int toIndex) |
int |
lastIndexOfAny(String s,
char[] chars,
int fromIndex,
int toIndex) |
int |
lastIndexOfAny(String s,
String[] texts) |
int |
lastIndexOfAny(String s,
String[] texts,
int toIndex) |
int |
lastIndexOfAny(String s,
String[] texts,
int fromIndex,
int toIndex) |
void |
lowerCase(String... array) |
String |
lowerCase(String s) |
String |
lowerCaseFirstLetter(String s) |
boolean |
matches(String s,
String pattern) |
boolean |
matchesIgnoreCase(String s,
String pattern) |
String |
merge(boolean[] array) |
String |
merge(boolean[] array,
String delimiter) |
String |
merge(char[] array) |
String |
merge(char[] array,
String delimiter) |
String |
merge(Collection<?> col) |
String |
merge(Collection<?> col,
String delimiter) |
String |
merge(double[] array) |
String |
merge(double[] array,
String delimiter) |
String |
merge(float[] array) |
String |
merge(float[] array,
String delimiter) |
String |
merge(int[] array) |
String |
merge(int[] array,
String delimiter) |
String |
merge(long[] array) |
String |
merge(long[] array,
String delimiter) |
String |
merge(Object[] array) |
String |
merge(Object[] array,
String delimiter) |
String |
merge(short[] array) |
String |
merge(short[] array,
String delimiter) |
String |
quote(String s) |
String |
quote(String s,
char quote) |
String |
quote(String s,
String quote) |
String |
randomId() |
String |
randomize(String s) |
String |
randomString() |
String |
randomString(int length) |
String |
read(ClassLoader classLoader,
String name) |
String |
read(ClassLoader classLoader,
String name,
boolean all) |
String |
read(InputStream is) |
void |
readLines(InputStream is,
Collection<String> lines) |
String |
remove(String s,
String element)
Deprecated.
|
String |
remove(String s,
String element,
String delimiter)
Deprecated.
|
String |
removeChar(String s,
char oldSub) |
String |
removeChars(String s,
char... oldSubs) |
String |
removeFromList(String s,
String element) |
String |
removeFromList(String s,
String element,
String delimiter) |
String |
removeSubstring(String s,
String oldSub) |
String |
removeSubstrings(String s,
String... oldSubs) |
String |
replace(String s,
char[] oldSubs,
char[] newSubs) |
String |
replace(String s,
char[] oldSubs,
String[] newSubs) |
String |
replace(String s,
char oldSub,
char newSub) |
String |
replace(String s,
char oldSub,
String newSub) |
String |
replace(String s,
String[] oldSubs,
String[] newSubs) |
String |
replace(String s,
String[] oldSubs,
String[] newSubs,
boolean exactMatch) |
String |
replace(String s,
String oldSub,
String newSub) |
String |
replace(String s,
String oldSub,
String newSub,
int fromIndex) |
String |
replace(String s,
String begin,
String end,
Map<String,String> values) |
String |
replaceFirst(String s,
char oldSub,
char newSub) |
String |
replaceFirst(String s,
char oldSub,
String newSub) |
String |
replaceFirst(String s,
String[] oldSubs,
String[] newSubs) |
String |
replaceFirst(String s,
String oldSub,
String newSub) |
String |
replaceFirst(String s,
String oldSub,
String newSub,
int fromIndex) |
String |
replaceLast(String s,
char oldSub,
char newSub) |
String |
replaceLast(String s,
char oldSub,
String newSub) |
String |
replaceLast(String s,
String[] oldSubs,
String[] newSubs) |
String |
replaceLast(String s,
String oldSub,
String newSub) |
StringBundler |
replaceToStringBundler(String s,
String begin,
String end,
Map<String,String> values) |
StringBundler |
replaceWithStringBundler(String s,
String begin,
String end,
Map<String,StringBundler> values) |
String |
reverse(String s)
Deprecated.
As of 7.0.0, with no direct replacement
|
String |
safePath(String path)
Deprecated.
As of 7.0.0, with no direct replacement
|
String |
shorten(String s) |
String |
shorten(String s,
int length) |
String |
shorten(String s,
int length,
String suffix) |
String |
shorten(String s,
String suffix) |
String[] |
split(String s) |
boolean[] |
split(String s,
boolean x) |
String[] |
split(String s,
char delimiter) |
double[] |
split(String s,
double x) |
float[] |
split(String s,
float x) |
int[] |
split(String s,
int x) |
long[] |
split(String s,
long x) |
short[] |
split(String s,
short x) |
String[] |
split(String s,
String delimiter) |
boolean[] |
split(String s,
String delimiter,
boolean x) |
double[] |
split(String s,
String delimiter,
double x) |
float[] |
split(String s,
String delimiter,
float x) |
int[] |
split(String s,
String delimiter,
int x) |
long[] |
split(String s,
String delimiter,
long x) |
short[] |
split(String s,
String delimiter,
short x) |
String[] |
splitLines(String s) |
boolean |
startsWith(String s,
char begin) |
boolean |
startsWith(String s,
String start) |
int |
startsWithWeight(String s1,
String s2) |
String |
strip(String s,
char remove)
Deprecated.
As of 7.0.0, replaced by
removeChar(String, char) |
String |
strip(String s,
char[] remove)
Deprecated.
As of 7.0.0, replaced by
removeChars(String,
char...) |
String |
stripBetween(String s,
String begin,
String end) |
String |
stripCDATA(String s) |
String |
stripParentheticalSuffix(String s) |
String |
toCharCode(String s) |
String |
toHexString(int i) |
String |
toHexString(long l) |
String |
toHexString(Object obj) |
String |
toLowerCase(String s) |
String |
toLowerCase(String s,
Locale locale) |
String |
toUpperCase(String s) |
String |
toUpperCase(String s,
Locale locale) |
String |
trim(String s) |
String |
trim(String s,
char c) |
String |
trim(String s,
char[] exceptions) |
String |
trimLeading(String s) |
String |
trimLeading(String s,
char c) |
String |
trimLeading(String s,
char[] exceptions) |
String |
trimTrailing(String s) |
String |
trimTrailing(String s,
char c) |
String |
trimTrailing(String s,
char[] exceptions) |
String |
unquote(String s) |
String |
upperCase(String s) |
String |
upperCaseFirstLetter(String s) |
String |
valueOf(Object obj)
Deprecated.
As of 7.0.0, with no direct replacement
|
boolean |
wildcardMatches(String s,
String wildcard,
char singleWildcardCharacter,
char multipleWildcardCharacter,
char escapeWildcardCharacter,
boolean caseSensitive) |
String |
wrap(String text) |
String |
wrap(String text,
int width,
String lineSeparator) |
public static StringUtil_IW getInstance()
public String add(String s, String add)
public String add(String s, String add, String delimiter)
public String add(String s, String add, String delimiter, boolean allowDuplicates)
public String appendParentheticalSuffix(String s, int suffix)
public String appendParentheticalSuffix(String s, String suffix)
public String bytesToHexString(byte[] bytes)
public boolean contains(String s, String text)
public boolean contains(String s, String text, String delimiter)
public boolean containsIgnoreCase(String s, String text)
public boolean containsIgnoreCase(String s, String text, String delimiter)
public int count(String s, char c)
public int count(String s, int start, int end, char c)
public int count(String s, int start, int end, String text)
public int count(String s, String text)
public boolean endsWith(String s, char end)
public boolean endsWith(String s, String end)
public boolean equals(String s1, String s2)
public boolean equalsIgnoreBreakLine(String s1, String s2)
public boolean equalsIgnoreCase(String s1, String s2)
@Deprecated public String extract(String s, char[] chars)
public String extractChars(String s)
public String extractDigits(String s)
public String extractFirst(String s, char delimiter)
public String extractFirst(String s, String delimiter)
public String extractLast(String s, char delimiter)
public String extractLast(String s, String delimiter)
public String extractLeadingDigits(String s)
@Deprecated public String highlight(String s, String[] queryTerms)
@Deprecated public String highlight(String s, String[] queryTerms, String highlight1, String highlight2)
public int indexOfAny(String s, char[] chars)
public int indexOfAny(String s, char[] chars, int fromIndex)
public int indexOfAny(String s, char[] chars, int fromIndex, int toIndex)
public int indexOfAny(String s, String[] texts)
public int indexOfAny(String s, String[] texts, int fromIndex)
public int indexOfAny(String s, String[] texts, int fromIndex, int toIndex)
public String insert(String s, String insert, int offset)
public boolean isLowerCase(String s)
public boolean isUpperCase(String s)
public int lastIndexOfAny(String s, char[] chars)
public int lastIndexOfAny(String s, char[] chars, int toIndex)
public int lastIndexOfAny(String s, char[] chars, int fromIndex, int toIndex)
public int lastIndexOfAny(String s, String[] texts)
public int lastIndexOfAny(String s, String[] texts, int toIndex)
public int lastIndexOfAny(String s, String[] texts, int fromIndex, int toIndex)
public String lowerCase(String s)
public void lowerCase(String... array)
public String lowerCaseFirstLetter(String s)
public boolean matches(String s, String pattern)
public boolean matchesIgnoreCase(String s, String pattern)
public String merge(boolean[] array)
public String merge(boolean[] array, String delimiter)
public String merge(char[] array)
public String merge(char[] array, String delimiter)
public String merge(Collection<?> col)
public String merge(Collection<?> col, String delimiter)
public String merge(double[] array)
public String merge(double[] array, String delimiter)
public String merge(float[] array)
public String merge(float[] array, String delimiter)
public String merge(int[] array)
public String merge(int[] array, String delimiter)
public String merge(long[] array)
public String merge(long[] array, String delimiter)
public String merge(Object[] array)
public String merge(Object[] array, String delimiter)
public String merge(short[] array)
public String merge(short[] array, String delimiter)
public String quote(String s)
public String quote(String s, char quote)
public String quote(String s, String quote)
public String randomId()
public String randomize(String s)
public String randomString()
public String randomString(int length)
public String read(ClassLoader classLoader, String name) throws IOException
IOException
public String read(ClassLoader classLoader, String name, boolean all) throws IOException
IOException
public String read(InputStream is) throws IOException
IOException
public void readLines(InputStream is, Collection<String> lines) throws IOException
IOException
@Deprecated public String remove(String s, String element)
@Deprecated public String remove(String s, String element, String delimiter)
public String removeChar(String s, char oldSub)
public String removeChars(String s, char... oldSubs)
public String removeFromList(String s, String element)
public String removeFromList(String s, String element, String delimiter)
public String removeSubstring(String s, String oldSub)
public String removeSubstrings(String s, String... oldSubs)
public String replace(String s, char oldSub, char newSub)
public String replace(String s, char oldSub, String newSub)
public String replace(String s, char[] oldSubs, char[] newSubs)
public String replace(String s, char[] oldSubs, String[] newSubs)
public String replace(String s, String oldSub, String newSub)
public String replace(String s, String oldSub, String newSub, int fromIndex)
public String replace(String s, String begin, String end, Map<String,String> values)
public String replace(String s, String[] oldSubs, String[] newSubs)
public String replace(String s, String[] oldSubs, String[] newSubs, boolean exactMatch)
public String replaceFirst(String s, char oldSub, char newSub)
public String replaceFirst(String s, char oldSub, String newSub)
public String replaceFirst(String s, String oldSub, String newSub)
public String replaceFirst(String s, String oldSub, String newSub, int fromIndex)
public String replaceFirst(String s, String[] oldSubs, String[] newSubs)
public String replaceLast(String s, char oldSub, char newSub)
public String replaceLast(String s, char oldSub, String newSub)
public String replaceLast(String s, String oldSub, String newSub)
public String replaceLast(String s, String[] oldSubs, String[] newSubs)
public StringBundler replaceToStringBundler(String s, String begin, String end, Map<String,String> values)
public StringBundler replaceWithStringBundler(String s, String begin, String end, Map<String,StringBundler> values)
@Deprecated public String reverse(String s)
@Deprecated public String safePath(String path)
public String shorten(String s)
public String shorten(String s, int length)
public String shorten(String s, int length, String suffix)
public String shorten(String s, String suffix)
public String[] split(String s)
public boolean[] split(String s, boolean x)
public String[] split(String s, char delimiter)
public double[] split(String s, double x)
public float[] split(String s, float x)
public int[] split(String s, int x)
public long[] split(String s, long x)
public short[] split(String s, short x)
public String[] split(String s, String delimiter)
public boolean[] split(String s, String delimiter, boolean x)
public double[] split(String s, String delimiter, double x)
public float[] split(String s, String delimiter, float x)
public int[] split(String s, String delimiter, int x)
public long[] split(String s, String delimiter, long x)
public short[] split(String s, String delimiter, short x)
public String[] splitLines(String s)
public boolean startsWith(String s, char begin)
public boolean startsWith(String s, String start)
public int startsWithWeight(String s1, String s2)
@Deprecated public String strip(String s, char remove)
removeChar(String, char)
@Deprecated public String strip(String s, char[] remove)
removeChars(String,
char...)
public String stripBetween(String s, String begin, String end)
public String stripCDATA(String s)
public String stripParentheticalSuffix(String s)
public String toCharCode(String s)
public String toHexString(int i)
public String toHexString(long l)
public String toHexString(Object obj)
public String toLowerCase(String s)
public String toLowerCase(String s, Locale locale)
public String toUpperCase(String s)
public String toUpperCase(String s, Locale locale)
public String trim(String s)
public String trim(String s, char c)
public String trim(String s, char[] exceptions)
public String trimLeading(String s)
public String trimLeading(String s, char c)
public String trimLeading(String s, char[] exceptions)
public String trimTrailing(String s)
public String trimTrailing(String s, char c)
public String trimTrailing(String s, char[] exceptions)
public String unquote(String s)
public String upperCase(String s)
public String upperCaseFirstLetter(String s)
@Deprecated public String valueOf(Object obj)
public boolean wildcardMatches(String s, String wildcard, char singleWildcardCharacter, char multipleWildcardCharacter, char escapeWildcardCharacter, boolean caseSensitive)
public String wrap(String text)
public String wrap(String text, int width, String lineSeparator)