The source code of custom Range you can find here. We can also use the in operator as part of for-loops: for (i in 'a'.'f') ") char var1 = 'a' ĬharRange characters = new CharRange(var1, 'z') īoolean isPresent = ntains('f') However, under the hood, the contains function from CharRange will be used. Val isPresent = 'f' in 'a'.rangeTo('c') // FALSE Val isPresent = 'f' in characters // TRUE Let's start with checking that a character f is a part of a specific Range. We can use the in operator with Range objects to know if a value is presented in a specific Range. Val numbersWithStep = 1.5 step 2 // 1 3 5 The IntProgression, CharProgression and LongProgression supports the custom step for progressions. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |