![]() Package kotlin.ranges /** * A range of values of type `Char`. In other words, a range is an interval from the start value to the end value. ![]() In this quick tutorial, weâll have a look at how we can define and use ranges in Kotlin. ![]() Both the start and end values belong to the range too. A range is a sequence of values defined by a start, an end, and a step. That is, a range of 1 as the start value and 5 as the end value. You can convert a range (or any Iterable) to a List with toList (): (1.5). A simple example would be, the values between 1 and 5 form a range. 3 Answers Sorted by: 13 That syntax creates a list of ranges ( List) with a single range in it.ClosedRange is further extended by CharRange, IntRange and LongRange which provides the functionality of Iterable also along with closed range which is used by for loops. A range is a collection of values determined by a start and stop value. Kotlin provides a set of built-in types that represent numbers.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |