indenting_buffer 1.0.0 copy "indenting_buffer: ^1.0.0" to clipboard
indenting_buffer: ^1.0.0 copied to clipboard

outdatedDart 1 only

A StringBuffer derivative that supports identation.

indenting_buffer #

Pub build status

A StringBuffer derivative that supports indentation.

Usage #

Example of writing a nicely-formatted function:

main() {  
    var js = new IndentingBuffer()..writeln('function main() {');
    js.indent()
      ..writeln('var x = "Hello, world!";')
      ..writeln('window.alert(x);');
    js.outdent().writeln('}');
    print(js);
}

Output:

function main() {
  var x = "Hello, world!";
  window.alert(x);
}

You can write text that ignores indentation:

direct() => buf.withoutIndentation('<some-text>');
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A StringBuffer derivative that supports identation.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

charcode

More

Packages that depend on indenting_buffer