max string length kotlin 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 string length
val hello = "Hello World"
// Use .length to get length of string
val stringLength = hello.length