ansi_wrap 0.1.2+1 copy "ansi_wrap: ^0.1.2+1" to clipboard
ansi_wrap: ^0.1.2+1 copied to clipboard

Wordwrap a string with ANSI escape codes.

example/ansi_wrap_example.dart

import 'package:ansi/ansi.dart';
import 'package:ansi_wrap/ansi_wrap.dart';

void main() {
  final input =
      'The quick brown ${ansi.red('fox jumped over ')}the lazy ${ansi.green('dog and then ran away with the unicorn.')}';
  print(wrapAnsi(input, 20));
}
0
likes
150
pub points
0%
popularity

Publisher

unverified uploader

Wordwrap a string with ANSI escape codes.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

ansi_codes, ansi_strip, characters, string_width

More

Packages that depend on ansi_wrap