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

outdated

Slice a string with ANSI escape codes.

example/ansi_slice_example.dart

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

void main() {
  final string = 'The quick brown ${ansi.red('fox jumped over ')}the lazy ${ansi.green('dog and then ran away with the unicorn.')}';
  print(sliceAnsi(string, start: 20, end: 30));
}
1
likes
0
points
0
downloads

Publisher

unverified uploader

Weekly Downloads

Slice a string with ANSI escape codes.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on ansi_slice