Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kseo/text_zipper
A two dimensional text zipper data structure.
https://github.com/kseo/text_zipper
Last synced: 27 days ago
JSON representation
A two dimensional text zipper data structure.
- Host: GitHub
- URL: https://github.com/kseo/text_zipper
- Owner: kseo
- License: bsd-3-clause
- Created: 2015-12-12T05:20:38.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-14T13:18:16.000Z (almost 9 years ago)
- Last Synced: 2023-08-20T23:23:57.968Z (about 1 year ago)
- Language: Dart
- Homepage: https://pub.dartlang.org/packages/text_zipper
- Size: 10.7 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
# text_zipper
A two dimensional text zipper data structure. It uses [The Zipper][zipper] data structure to implement a purely functional text buffer.
[zipper]: https://www.st.cs.uni-saarland.de/edu/seminare/2005/advanced-fp/docs/huet-zipper.pdf
## Usage
```dart
import 'package:text_zipper/text_zipper.dart';main() {
const String text = '''
abc
df
efg''';var tz = stringZipper(text);
tz = tz.moveCursorTo(new Position(1, 1)).insertCharCode('e'.codeUnitAt(0));
print(tz.text);
/// abc
/// def
/// efg
}
```## Features and bugs
Please file feature requests and bugs at the [issue tracker][tracker].
[tracker]: https://github.com/kseo/text_zipper/issues