Last active
July 27, 2022 08:06
-
-
Save ridhotegar/03ca1ac858247527a74ecfe4df1ce82a to your computer and use it in GitHub Desktop.
Kotlin Filter ArrayList<String>() | https://pl.kotl.in/zkn5GcMwM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main() { | |
val aaa = ArrayList<String>() | |
aaa.add("Mobil") | |
aaa.add("Motor") | |
var bbb = ArrayList<String>() | |
for(row in aaa) { | |
if(row.lowercase().contains("mot")) { | |
bbb.add(row) | |
} | |
} | |
println(bbb) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment