W3cubDocs

/Kotlin

isISOControl

Platform and version requirements: JVM (1.0), Native (1.3)
fun Char.isISOControl(): Boolean
For JVM

Returns true if this character is an ISO control character.

import kotlin.test.*
import java.util.*

fun main(args: Array<String>) {
//sampleStart
val chars = listOf('\u0000', '\u000E', '\u0009', '1', 'a')
val (isoControls, notIsoControls) = chars.partition { it.isISOControl() }
// some ISO-control char codes
println(isoControls.map(Char::toInt)) // [0, 14, 9]
// non-ISO-control chars
println(notIsoControls) // [1, a]
//sampleEnd
}
For Native

Returns true if this character is an ISO control character.

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/is-i-s-o-control.html