minWith (original) (raw)

kotlin-stdlib/kotlin.text/minWith

@JvmName(name = "minWithOrThrow")

fun CharSequence.minWith(comparator: Comparator<in Char>): Char(source)

Returns the first character having the smallest value according to the provided comparator.

Since Kotlin

1.7

Throws

NoSuchElementException

if the char sequence is empty.

fun CharSequence.minWith(comparator: Comparator<in Char>): Char?(source)

Deprecated

Warning since 1.4

Error since 1.5

Hidden since 1.6

Use minWithOrNull instead.

Replace with

this.minWithOrNull(comparator)

Content copied to clipboard

Since Kotlin

1.0

Thanks for your feedback!

Was this page helpful?