<Split character from string in Idiomatic way Kotl...
# stackoverflow
u
Split character from string in Idiomatic way Kotlin Hey I am working in kotlin. I have one string in which I want to split into list from there where I should provide character. I'll explain in details For example 1 val string = "Birth Control" val searchText = "n" Output ["Birth Co", "trol"] For example 2 val string = "Bladder Infection" val searchText = "i" Actual Output ["Bladder ", "nfect", "on"] Expect Output ["Bladder ", "nfect", "ion"] I tried some code but example 1 is working fine but example 2 is not because I only want to...