Skip to content

Instantly share code, notes, and snippets.

@ridhotegar
Last active July 27, 2022 08:06
Show Gist options
  • Save ridhotegar/03ca1ac858247527a74ecfe4df1ce82a to your computer and use it in GitHub Desktop.
Save ridhotegar/03ca1ac858247527a74ecfe4df1ce82a to your computer and use it in GitHub Desktop.
Kotlin Filter ArrayList<String>() | https://pl.kotl.in/zkn5GcMwM
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