Package-level declarations

Functions

Link copied to clipboard
inline fun <K, E> MutableMap<K, E>.computeIfAbsent(key: K, initializer: () -> E): E

Retrieves the element corresponding to key from this map if it already exists or creates it by calling initializer and saving the result to the map

Link copied to clipboard
fun ByteArray.hash(algorithm: String): String

Hashes this ByteArray using algorithm.

fun String.hash(algorithm: String): String

Hashes this String using algorithm.

Link copied to clipboard

Returns false if this nullable char sequence is either null or empty or consists solely of whitespace characters.

Link copied to clipboard

Returns false if this nullable char sequence is either null or empty.

Link copied to clipboard

Checks whether a String is not numeric (meaning it contains an Integer)

Link copied to clipboard

Checks whether a String is numeric (meaning it contains an Integer)

Link copied to clipboard
fun String.limit(maxLength: Int, truncate: String = "..."): String

Limits this string to maxLength and adds truncate at the end if the string was shortened-

Link copied to clipboard
inline fun <C : CharSequence> C.nullIfBlank(): C?

Returns null if this String isBlank or the String itself

Link copied to clipboard
inline fun <T> Iterable<T>.onEach(action: T.() -> Unit)

Performs the given action on each element.

Link copied to clipboard
fun List<String>.paginate(pageLength: Int, separator: String = ""): List<String>

Tries to paginate this Strings (seperated by separator) into pages of pageLength with words in mind.

Link copied to clipboard
fun Path.parent(n: Int): Path

Returns the nth parent of this Path.

Link copied to clipboard
fun <T> Queue<T>.poll(amount: Int): List<T?>

Polls amount items from this Queue.

Link copied to clipboard

Removes all lines and replaces them with separator.

Link copied to clipboard

Hashes this ByteArray using SHA-256.

Hashes this String using SHA-256.

Link copied to clipboard

Splits a comma seperated list.

Link copied to clipboard

Splits a comma seperated list.