isISOControl
Returns true if the Unicode character corresponding to this code point is an ISO control character.
A character is considered to be an ISO control character if its category is CharCategory.CONTROL, meaning the Char is in the range '\u0000'..'\u001F' or in the range '\u007F'..'\u009F'.
Since Kotlin
2.5Samples
import kotlin.text.unicode.*
import kotlin.test.*
fun main() {
//sampleStart
val controlRange1 = '\u0000'.toCodePoint()..'\u001F'.toCodePoint()
println("controlRange1.all { it.isISOControl() } is ${controlRange1.all { it.isISOControl() }}") // true
val letterRange = 'a'.toCodePoint()..'z'.toCodePoint()
println("letterRange.none { it.isISOControl() } is ${letterRange.none { it.isISOControl() }}") // true
//sampleEnd
}Content copied to clipboard
Returns true if the Unicode character corresponding to this code point is an ISO control character.
A character is considered to be an ISO control character if its category is CharCategory.CONTROL, meaning the Char is in the range '\u0000'..'\u001F' or in the range '\u007F'..'\u009F'.
Since Kotlin
2.5Samples
import kotlin.text.unicode.*
import kotlin.test.*
fun main() {
//sampleStart
val controlRange1 = '\u0000'.toCodePoint()..'\u001F'.toCodePoint()
println("controlRange1.all { it.isISOControl() } is ${controlRange1.all { it.isISOControl() }}") // true
val letterRange = 'a'.toCodePoint()..'z'.toCodePoint()
println("letterRange.none { it.isISOControl() } is ${letterRange.none { it.isISOControl() }}") // true
//sampleEnd
}Content copied to clipboard