Package-level declarations

Text utilities to allow the use of ANSI escape codes among other features.

Types

Link copied to clipboard
object Ansi

Constants for console formatting with ANSI codes. They can be used in strings to enable or disable a display option.

Link copied to clipboard
object AnsiColor
Link copied to clipboard
object AnsiEffect
Link copied to clipboard
class Glob(val pattern: String)

.

Properties

Link copied to clipboard
val eol: String

Runtime specific end of line.

Link copied to clipboard

Supported types for the parseOrNull function.

Functions

Link copied to clipboard
fun String.banner(bannerDelimiter: String = "*"): String

Format the string as a banner with a delimiter above and below text. The character used to render the delimiter is defined.

Link copied to clipboard

Decode this base64 encoded string.

Link copied to clipboard

Encode the content of this byteArray to base64.

Encode this string to base64.

Link copied to clipboard
fun String.filter(prefix: String, suffix: String, parameters: Map<String, *>): String

.

Link copied to clipboard
fun String.filterVars(parameters: Map<*, *>): String

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.

Link copied to clipboard
Link copied to clipboard
fun <T : Any> String.parse(type: KClass<T>): T

.

Link copied to clipboard
fun <T : Any> String?.parseOrNull(type: KClass<T>): T?

.

Link copied to clipboard
fun String.prependIndent(count: Int = 4, pad: String = " "): String

.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <T : Enum<*>> String.toEnum(converter: (String) -> T): T

.

Link copied to clipboard
fun <T : Enum<*>> String.toEnumOrNull(converter: (String) -> T): T?

.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun utf8(vararg bytes: Int): String

.