ansi_slice 0.1.1+1 copy "ansi_slice: ^0.1.1+1" to clipboard
ansi_slice: ^0.1.1+1 copied to clipboard

Slice a string with ANSI escape codes.

ansi_slice #

Slice a string with ANSI escape codes

Install #

$ dart pub add ansi_slice

Usage #

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

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

0
likes
130
pub points
0%
popularity

Publisher

unverified uploader

Slice a string with ANSI escape codes.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

More

Packages that depend on ansi_slice