Klasse StringTool
java.lang.Object
ch.nolix.core.commontypetool.stringtool.StringTool
- Version:
- 2025-03-09
- Autor:
- Silvan Wyss
-
Methodenübersicht
Modifizierer 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)
-
Methodendetails
-
createStringWithoutLastCharacters
- Parameter:
string-n-- Gibt zurück:
- a new
Stringthat is like the given string without the last n characters.
-
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
- Parameter:
string-- Gibt zurück:
- a new
Stringin capital snake case for the given string.
-
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
- Parameter:
string-- Gibt zurück:
- a new
Stringin pascal case for the given string.
-