Klasse StringTool
java.lang.Object
ch.nolix.core.commontypetool.stringtool.StringTool
- Autor:
- Silvan Wyss
-
Methodenübersicht
Modifikator und TypMethodeBeschreibungstatic StringcreateStringWithoutLastCharacters(String string, int n) static StringcreateTabs(int tabCount) static StringgetInBraces(Object object) static StringgetInParentheses(Object object, Object... objects) static StringgetInSingleQuotes(Object object) static booleanstatic StringtoCapitalSnakeCase(String string) static doublestatic StringtoPascalCase(String string) static doubletoProportion(String string)
-
Methodendetails
-
createStringWithoutLastCharacters
-
createTabs
- Parameter:
tabCount-- Gibt zurück:
- a new
Stringconsisting of as many tabulators as the given tabCount says. - Löst aus:
RuntimeException- if the given tabCount is negative.
-
getInBraces
- Parameter:
object-- Gibt zurück:
- the
Stringrepresentation of the given object in braces. - Löst aus:
RuntimeException- if the given object is null.
-
getInParentheses
- Parameter:
object-objects-- Gibt zurück:
- the
Stringrepresentation of the given object and objects in parentheses. - Löst aus:
RuntimeException- if the given object is null.RuntimeException- if the given objects is null.RuntimeException- if one of the given objects is null.
-
getInSingleQuotes
- Parameter:
object-- Gibt zurück:
- the
Stringrepresentation of the given object in single quotes. - Löst aus:
RuntimeException- if the given object is null.
-
toBoolean
- Parameter:
string-- Gibt zurück:
- the boolean the given string represents.
- Löst aus:
RuntimeException- if the given string does not represent a boolean.
-
toCapitalSnakeCase
-
toDouble
- Parameter:
string-- Gibt zurück:
- the double the given string represents.
- Löst aus:
RuntimeException- if the given string does not represent a double.
-
toPascalCase
-
toProportion
- Parameter:
string-- Gibt zurück:
- a proportion in [0, 1] from the given string.
- Löst aus:
RuntimeException- if the given string does not represent a proportion.
-