Reputation: 1672
I want to check a string is starting with a particular string or not, how can check that in kotlin
Upvotes: 3
Views: 7639
Reputation: 42441
val s = "hello"
println(s.startsWith("hel")) // true
println(s.startsWith("hal")) // false
Upvotes: 10