Schnittstelle IStringTool
- Alle bekannten Implementierungsklassen:
StringToolUnit
public interface IStringTool
The
IStringTool provides methods to handle Strings.- Version:
- 2024-07-22
- Autor:
- Silvan Wyss
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungcreateStringWithoutLastCharacters(String string, int n) createTabs(int tabCount) getInBraces(Object object) getInParentheses(Object object, Object... objects) getInSingleQuotes(Object object) booleantoCapitalSnakeCase(String string) doubletoPascalCase(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.
-