hasValidLength

inline fun String.hasValidLength(length: Int, block: () -> Unit)

Checks that the length of a string is valid for block execution

Example:

var result: Boolean? = null
"12345678".hasValidLength(8) { result = true }
result // true

Since

1.1.0