|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jvntextpro.util.StringUtils
public class StringUtils
The Class StringUtils.
Constructor Summary | |
---|---|
StringUtils()
|
Method Summary | |
---|---|
static java.lang.String |
capitalizeWord(java.lang.String s)
Capitalises the first letter of a given string. |
static boolean |
containLetter(java.lang.String str)
Contain letter. |
static boolean |
containLetterAndDigit(java.lang.String str)
Contain letter and digit. |
static boolean |
containNumber(java.lang.String str)
Contain number. |
static int |
countOccurrences(java.lang.String s,
char c)
Counts the number of occurrences of a character in the specified String. |
static int |
countSigns(java.lang.String str)
Count signs. |
static int |
countStops(java.lang.String str)
Count stops. |
static java.lang.String |
doubleQuote(java.lang.String s)
Encloses the specified String in double quotes. |
static boolean |
endsWithSign(java.lang.String str)
Ends with sign. |
static boolean |
endsWithStop(java.lang.String str)
Ends with stop. |
static int |
findFirstNotOf(java.lang.String container,
java.lang.String chars,
int begin)
Find first not of. |
static int |
findFirstOf(java.lang.String container,
java.lang.String chars,
int begin)
Find first of. |
static int |
findLastNotOf(java.lang.String container,
java.lang.String charSeq,
int end)
Find last not of. |
static int |
findLastOf(java.lang.String container,
java.lang.String charSeq,
int begin)
Find last of. |
static int |
indexOf(java.lang.String[] array,
java.lang.String s)
Returns the index of the first occurrence of the specified String in an array of Strings. |
static boolean |
isAllCap(java.lang.String str)
Checks if is all cap. |
static boolean |
isAllNumber(java.lang.String str)
Checks if is all number. |
static boolean |
isBlank(java.lang.String s)
Checks whether a String is whitespace, empty or null. |
static boolean |
isContained(java.lang.String[] array,
java.lang.String s)
Indicates whether the specified array of Strings contains a given String. |
static boolean |
isFirstCap(java.lang.String str)
Checks if is first cap. |
static boolean |
isFirstCap1(java.lang.String str)
Checks if is first cap1. |
static boolean |
isNotFirstCap(java.lang.String str)
Checks if is not first cap. |
static boolean |
isSign(java.lang.String str)
Checks if is sign. |
static boolean |
isStop(java.lang.String str)
Checks if is stop. |
static boolean |
isWhitespace(java.lang.String s)
Checks whether a String is composed entirely of whitespace characters. |
static java.lang.String |
join(java.util.Collection col,
char sep)
Join the String representations of a collection of objects, with the specified separator. |
static java.lang.String |
join(java.lang.Object[] objects,
char sep)
Join the String representations of an array of objects, with the specified separator. |
static java.lang.String |
pad(java.lang.String s,
int length)
Pad the specified String with spaces on the right-hand side. |
static java.lang.String |
quote(java.lang.String s)
Encloses the specified String in single quotes. |
static java.lang.String |
sort(java.lang.String s)
Sorts the characters in the specified string. |
static java.util.ArrayList<java.lang.String> |
toList(java.util.Set<java.lang.String> set)
Creates a new ArrayList collection from the specified Set of Strings. |
static java.util.ArrayList<java.lang.String> |
toList(java.lang.String[] array)
Creates a new ArrayList collection from the specified array of Strings. |
static java.util.Vector<java.lang.String> |
toVector(java.lang.String[] array)
Creates a new Vector collection from the specified array of Strings. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringUtils()
Method Detail |
---|
public static int findFirstOf(java.lang.String container, java.lang.String chars, int begin)
container
- the containerchars
- the charsbegin
- the begin
public static int findLastOf(java.lang.String container, java.lang.String charSeq, int begin)
container
- the containercharSeq
- the char seqbegin
- the begin
public static int findFirstNotOf(java.lang.String container, java.lang.String chars, int begin)
container
- the containerchars
- the charsbegin
- the begin
public static int findLastNotOf(java.lang.String container, java.lang.String charSeq, int end)
container
- the containercharSeq
- the char seqend
- the end
public static boolean containNumber(java.lang.String str)
str
- the str
public static boolean containLetter(java.lang.String str)
str
- the str
public static boolean containLetterAndDigit(java.lang.String str)
str
- the str
public static boolean isAllNumber(java.lang.String str)
str
- the str
public static boolean isFirstCap(java.lang.String str)
str
- the str
public static boolean isFirstCap1(java.lang.String str)
str
- the str
public static boolean isAllCap(java.lang.String str)
str
- the str
public static boolean isNotFirstCap(java.lang.String str)
str
- the str
public static boolean endsWithSign(java.lang.String str)
str
- the str
public static boolean endsWithStop(java.lang.String str)
str
- the str
public static int countStops(java.lang.String str)
str
- the str
public static int countSigns(java.lang.String str)
str
- the str
public static boolean isStop(java.lang.String str)
str
- the str
public static boolean isSign(java.lang.String str)
str
- the str
public static java.lang.String join(java.lang.Object[] objects, char sep)
objects
- the objectssep
- the sep
public static java.lang.String join(java.util.Collection col, char sep)
col
- the colsep
- the sep
public static java.lang.String capitalizeWord(java.lang.String s)
s
- the input string
public static java.lang.String quote(java.lang.String s)
s
- the input string
public static java.lang.String doubleQuote(java.lang.String s)
s
- the input string
public static java.lang.String pad(java.lang.String s, int length)
s
- String to add spaceslength
- Desired length of string after padding
public static java.lang.String sort(java.lang.String s)
s
- input String to sort.
public static boolean isBlank(java.lang.String s)
s
- the String to analyze.
public static boolean isWhitespace(java.lang.String s)
s
- the String to analyze.
public static int countOccurrences(java.lang.String s, char c)
s
- the String to analyze.c
- the character to search for.
public static boolean isContained(java.lang.String[] array, java.lang.String s)
array
- the arrays
- the s
public static int indexOf(java.lang.String[] array, java.lang.String s)
array
- array of Strings to search.s
- the String to search for.
public static java.util.ArrayList<java.lang.String> toList(java.lang.String[] array)
array
- the array
public static java.util.Vector<java.lang.String> toVector(java.lang.String[] array)
array
- the array
public static java.util.ArrayList<java.lang.String> toList(java.util.Set<java.lang.String> set)
set
- a set of Strings.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |