- Kotlin Standard Library Cookbook
- Samuel Urbanowicz
- 150字
- 2021-07-23 19:05:46
Exploring the use of range expressions to iterate through alphabet characters
Ranges, provided by the Kotlin standard library, are a powerful solution for implementing iteration and conditional statements in a natural and safe way. A range can be understood as an abstract data type that represents a set of iterable elements and allows iteration through them in a declarative way. The ClosedRange interface from the kotlin.ranges package is a basic model of the range data structure. It contains references to the first and last elements of the range and provides the contains(value: T): Boolean and isEmpty(): Boolean functions, which are responsible for checking whether the specified element belongs to the range and whether the range is empty. In this recipe, we are going to learn how to declare a range that consists of alphabet characters and iterate through it in a decreasing order.
- Cocos2D-X權威指南(第2版)
- R語言數據可視化之美:專業圖表繪制指南
- Learning SAP Analytics Cloud
- Python進階編程:編寫更高效、優雅的Python代碼
- Learning Neo4j 3.x(Second Edition)
- Learning OpenStack Networking(Neutron)
- Visual Basic程序設計
- 從零開始學Linux編程
- Processing創意編程指南
- 超簡單:用Python讓Excel飛起來(實戰150例)
- Java高手是怎樣煉成的:原理、方法與實踐
- MongoDB Administrator’s Guide
- Unity 5 Game Optimization
- Learning ROS for Robotics Programming
- HTML5 and CSS3:Building Responsive Websites