text_zipper 0.1.0
text_zipper: ^0.1.0 copied to clipboard
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.