Package com.jidesoft.utils
Class StringUtils
java.lang.Object
com.jidesoft.utils.StringUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Returns the max String in the strings list.static String
Returns the min String in the strings list.Returns the range of numbers.static String
stringList
(Object[] objects) static String
stringList
(String prefix, String suffix, String separator, Object... objects) Constructs a list of items in a string form using a prefix and suffix to denote the start and end of the list and a separator string in between the items.static String
stringList
(List<?> objects) static String
toCamelCase
(String str) Converts the supplied string to CamelCase by converting the first character to upper case and the rest of the string to lower case.
-
Constructor Details
-
StringUtils
public StringUtils()
-
-
Method Details
-
toCamelCase
Converts the supplied string to CamelCase by converting the first character to upper case and the rest of the string to lower case.- Parameters:
str
- the input string- Returns:
- a string
-
stringList
Constructs a list of items in a string form using a prefix and suffix to denote the start and end of the list and a separator string in between the items. For example, with a prefix of '(', a suffix of ')', a separator of ',' and a list ["a", "b", "c"] it would generate the string "(a,b,c)"- Parameters:
prefix
- the prefix for the concatenated string.suffix
- the suffix for the concatenated string.separator
- the separator between the elements.objects
- the array of the elements.- Returns:
- a concatenated string of the elements in the array.
-
stringList
-
stringList
-
min
Returns the min String in the strings list.- Parameters:
strings
- the numbers to calculate the min.- Returns:
- the min String in the strings list.
-
max
Returns the max String in the strings list.- Parameters:
strings
- the numbers to calculate the max.- Returns:
- the max String in the strings list.
-
range
Returns the range of numbers.- Parameters:
strings
- the numbers to calculate the range.- Returns:
- the range of the numbers.
-