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

Wordwrap a string with ANSI escape codes.

ansi_wrap #

Wordwrap a string with ANSI escape codes

Install #

$ dart pub add ansi_wrap
copied to clipboard

Usage #

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

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

Publisher

unverified uploader

Weekly Downloads

2024.09.09 - 2025.03.24

Wordwrap a string with ANSI escape codes.

Homepage
Repository (GitHub)

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

ansi_codes, ansi_strip, characters, string_width

More

Packages that depend on ansi_wrap