Package com.hexagonkt.core
Class StringsKt
-
- All Implemented Interfaces:
public final class StringsKt
-
-
Field Summary
Fields Modifier and Type Field Description private final static Stringeolprivate final static Set<KClass<?>>parsedClasses
-
Method Summary
Modifier and Type Method Description final StringgetEol()Runtime specific end of line. final Set<KClass<?>>getParsedClasses()Supported types for the parseOrNull function. final static StringfilterVars(String $self, Map<?, ?> parameters)Filter the target string substituting each key by its value. final static Stringfilter(String $self, String prefix, String suffix, Map<String, ?> parameters)TODO. final static StringencodeToBase64(ByteArray $self)Encode the content of this byteArray to base64. final static StringencodeToBase64(String $self)Encode this string to base64. final static ByteArraydecodeBase64(String $self)Decode this base64 encoded string. final static <T extends Any> Tparse(String $self, KClass<T> type)TODO. final static <T extends Any> TparseOrNull(String $self, KClass<T> type)TODO. final static StringstripAnsi(String $self)final static InputStreamtoStream(String $self)TODO. final static StringprependIndent(String $self, Integer count, String pad)TODO. -
-
Method Detail
-
getEol
final String getEol()
Runtime specific end of line.
-
getParsedClasses
final Set<KClass<?>> getParsedClasses()
Supported types for the parseOrNull function.
-
filterVars
final static String filterVars(String $self, Map<?, ?> parameters)
Filter the target string substituting each key by its value. The keys format resembles Mustache's one:
{{key}}and all occurrences are replaced by the supplied value.If a variable does not have a parameter, it is left as it is.
- Parameters:
parameters- The map with the list of key/value tuples.
-
filter
final static String filter(String $self, String prefix, String suffix, Map<String, ?> parameters)
TODO.
- Parameters:
prefix- .suffix- .parameters- .
-
encodeToBase64
final static String encodeToBase64(ByteArray $self)
Encode the content of this byteArray to base64.
-
encodeToBase64
final static String encodeToBase64(String $self)
Encode this string to base64.
-
decodeBase64
final static ByteArray decodeBase64(String $self)
Decode this base64 encoded string.
-
parseOrNull
final static <T extends Any> T parseOrNull(String $self, KClass<T> type)
TODO.
- Parameters:
type- .
-
stripAnsi
final static String stripAnsi(String $self)
-
prependIndent
final static String prependIndent(String $self, Integer count, String pad)
TODO.
- Parameters:
count- .pad- .
-
-
-
-