Package-level declarations

An Exkt module providing common extensions for Kotlin.

An Exkt module providing common extensions for Kotlin.

Types

Link copied to clipboard

Properties

Link copied to clipboard

Returns pathname of the current Document URL.

Functions

Link copied to clipboard
infix fun <T> Iterable<T>.anyIn(other: Iterable<T>): Boolean

Returns true if one of the elements in this collection is in the other one. false otherwise.

Link copied to clipboard

Returns true if this collection has duplicate objects. false otherwise.

Link copied to clipboard
fun <E, T> Iterable<E>.hasDuplicatesOf(selector: (E) -> T): Boolean

Returns true if this collection has duplicate objects produced by the given selector function. false otherwise.

Link copied to clipboard

Returns true if this string has whitespace characters. false otherwise.

Link copied to clipboard

Returns the lengthiest string in this collection or null if there are no elements.

Link copied to clipboard
inline fun <E, R> Iterable<E>.mapToMutableList(transform: (E) -> R): MutableList<R>

Transforms the elements of this collection using map and returns MutableList representation of the transformed collection.

Link copied to clipboard
fun String.padding(padding: PaddingConfig.() -> Unit): String

Returns transformed string with padding specified by PaddingConfig. Example usage:

fun String.padding(value: Int): String

Returns transformed string with padding specified by value. Padding is applied in all directions. Example usage:

Link copied to clipboard

Parses this string as IntRange. The format is equal to Kotlin rangeTo operator. Example usage:

Link copied to clipboard

Shortcut for replacePlaceholders("id" to replacement).

Link copied to clipboard
fun String.replacePlaceholders(vararg replacements: Pair<String, String>): String

Replaces placeholders in this string. Uses the following placeholder format: {placeholder_name}. Placeholders can be duplicated.

Link copied to clipboard

Returns this string if it's not null. Empty string otherwise.

Link copied to clipboard

Shortcut for joinToString(" ")

Link copied to clipboard
inline fun <E> Iterable<E>.withEach(block: E.() -> Unit)