Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xtyxtyx/range2
Python-like range() implementation.
https://github.com/xtyxtyx/range2
Last synced: about 2 months ago
JSON representation
Python-like range() implementation.
- Host: GitHub
- URL: https://github.com/xtyxtyx/range2
- Owner: xtyxtyx
- License: mit
- Created: 2019-10-23T13:20:36.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-23T13:24:45.000Z (about 5 years ago)
- Last Synced: 2023-08-20T22:59:35.630Z (over 1 year ago)
- Language: Dart
- Homepage: https://pub.dev/packages/range2
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
## Usage
A simple usage example:
```dart
import 'package:range2/range2.dart';main() {
print('${range(1, 5)}'); // (1, 2, 3, 4)
print('${range(1, 10, 3)}'); // (1, 4, 7)
print('${range(-5, 0)}'); // (-5, -4, -3, -2, -1)
print('${range(-5, -10, -1)}'); // (-5, -6, -7, -8, -9)for (var n in range(1, 10, 2)) {
print(n);
}
// 1
// 3
// 5
// 7
// 9
}```
## Features and bugs
Please file feature requests and bugs at the [issue tracker][tracker].
[tracker]: https://github.com/xtyxtyx/range2/issues