Software Development

Kotlin – Check if a certain values exists in a list

This post shows examples of codes to check if certain values exists in a list.

Requirements

  • IntelliJ IDEA Ultimate 2016.3
    • The Community Edition may be enough but we have not tried it.
  • Kotlin Version 1.1
  • Windows 10 Enterprise

Check if String is in a list

[wp_ad_camp_1]

Outputs:

Check if array of Strings is in a list

[wp_ad_camp_2]

Outputs:

[wp_ad_camp_3]

Got comments, or suggestions? Please visit our Facebook page!

You Might Also Like