https://kotlinlang. org/api/latest/jvm/stdlib/kotlin/-string/index.html code example
Example 1: kotlin part of string
val name = "James Smith"
// Get just 'James' with subSequence()
val james = name.subSequence(0, 5)
// First argument is inclusive
// Second argument is exclusive
Example 2: Kotlin get char in string
val hello = "Hello World"
// Using get() function
val W = hello.get(6)
// Using indexing
val e = hello[1]