https://github.com/ahmad-mtr/string_tokenizer
A Dart package that separates a string to Tokens.
https://github.com/ahmad-mtr/string_tokenizer
dart string string-manipulation stringtokenizer tokenizer
Last synced: 9 months ago
JSON representation
A Dart package that separates a string to Tokens.
- Host: GitHub
- URL: https://github.com/ahmad-mtr/string_tokenizer
- Owner: Ahmad-Mtr
- License: bsd-3-clause
- Created: 2024-01-16T07:08:32.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-01-16T11:19:56.000Z (about 2 years ago)
- Last Synced: 2024-02-16T08:22:29.814Z (about 2 years ago)
- Topics: dart, string, string-manipulation, stringtokenizer, tokenizer
- Language: Dart
- Homepage: https://pub.dev/packages/string_tokenizer_1
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
A more advanced String Tokenizer than the available `split()` method in dart.
## Features
1. Splitting Strings into multiple chunks based on delimeters, and the ability to change those delimeters anytime.
2. Checking if the String has more Tokens, `hasMoreTokens()`.
3. Use every Token for any processing on the go, while still having the non-tokenized part of the Input String with `nextToken()`.
4. Can Tokenize all Input String similarlly to `split()` method, by using `tokenizeAll()`.
## Getting started
```bash
dart pub add string_tokenizer_1
```
## Usage
> Longer examples in `/example` folder.
```dart
import 'package:string_tokenizer_1/string_tokenizer_1.dart';
```
```dart
final input2 =
"package:string_tokenizer/...";
final objkt2 = StringTokenizer(input2, [':']);
final res = objkt2.nextToken();
print(res); // package
```
## Additional information
* All information, source code: [Github Repo](https://github.com/Ahmad-Mtr/string_tokenizer).
* All Contributions are welcome via pull-requests, please make sure to submit cleaner code, with documenting changes or providing a basic info for other users of this Package.
* Issues, suggestions, are all welcome via Github Issues.
> Please note that this package was intended only for a personal project of mine, there's a high chance of not contributing to this package later.