text_zipper 0.1.0 copy "text_zipper: ^0.1.0" to clipboard
text_zipper: ^0.1.0 copied to clipboard

Dart 1 only

A two dimensional text zipper data structure.

text_zipper #

A two dimensional text zipper data structure. It uses The Zipper data structure to implement a purely functional text buffer.

Usage #

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.

0
likes
30
points
1
downloads

Publisher

unverified uploader

Weekly Downloads

A two dimensional text zipper data structure.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

quiver_check

More

Packages that depend on text_zipper