Answers for "how to get a part of a string kotlin"

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
Posted by: Guest on October-27-2020

Code answers related to "how to get a part of a string kotlin"

Browse Popular Code Answers by Language