"how to check whether a string contains a substring in kotlin?" Code Answer


kotlin has stdlib package to perform certain extension function operation over the string, you can check this method it will check the substring in a string, you can ignore the case by passing true/false value. refer this link

"abbacca".contains("bac", ignorecase = true)
By code_angel on October 1 2022
Only authorized users can answer the Search term. Please sign in first, or register a free account.