To find index of substring in this string in Kotlin, call indexOf() method on this string, and pass the substring as argument . String. indexOf() returns an integer representing the index of first occurrence of the match for the given substring.
To find index of substring in this string in Kotlin, call indexOf() method on this string, and pass the substring as argument . String. indexOf() returns an integer representing the index of first occurrence of the match for the given substring.