Created
February 27, 2020 07:39
-
-
Save Audhil/8b9ee912b8f855b4ee3486e628bd1ad5 to your computer and use it in GitHub Desktop.
kotlin scope function
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 valueIs = "Jack and jill went up the hill!" | |
val result = valueIs.run { | |
this.contains("help") | |
} | |
println(valueIs) // o/p - Jack and jill went up the hill! | |
println(result) // o/p - false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment