|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.atunes.utils.StringUtils
public class StringUtils
Utility methods for Strings.
Constructor Summary | |
---|---|
StringUtils()
|
Method Summary | |
---|---|
static java.lang.String |
convertFirstCharacterToUppercase(java.lang.String s)
Converts the first character of a String to uppercase. |
static java.lang.String |
fromByteToMegaOrGiga(long size)
Given an amount of bytes, return a string representation in Bytes, Kilobytes, Megabytes or Gigabytes Examples: Given 1024 bytes -> "1KB" Given 1536 bytes -> 1.5KB" |
static java.lang.String |
fromSecondsToHoursAndDays(long s)
Given an amount of seconds, returns a string representation in minutes, hours and days. |
static java.util.List<java.lang.String> |
fromStringArrayToList(java.lang.String... str)
Returns a List containing strings of the array. |
static java.lang.String |
getString(java.lang.Object... strings)
Returns a string with concatenation of argument array. |
static boolean |
isEmpty(java.lang.String s)
Checks if a String is empty. |
static java.lang.String |
toString(double value,
int numberOfDecimals)
Returns a double value as a string with a given number of decimal digits. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringUtils()
Method Detail |
---|
public static java.lang.String fromByteToMegaOrGiga(long size)
size
- amount of bytes
public static java.lang.String fromSecondsToHoursAndDays(long s)
s
- seconds
public static java.util.List<java.lang.String> fromStringArrayToList(java.lang.String... str)
Returns a List containing strings of the array. Text between " chars, are returned on a string
Example: {"This", "is\"", "a ", "test\""} will return: "This" "is" "a test"
str
- String array
public static java.lang.String getString(java.lang.Object... strings)
strings
- strings
public static java.lang.String toString(double value, int numberOfDecimals)
value
- double valuenumberOfDecimals
- number of decimal digits
public static java.lang.String convertFirstCharacterToUppercase(java.lang.String s)
s
- A String that should be converted
public static boolean isEmpty(java.lang.String s)
s
- A String
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |