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.

example/ansi_slice_example.dart

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));
}
copied to clipboard
1
likes
150
points
14
downloads

Publisher

unverified uploader

Weekly Downloads

2024.09.13 - 2025.03.28

Slice a string with ANSI escape codes.

Homepage
Repository (GitHub)

Documentation

API reference

License

Apache-2.0 (license)

More

Packages that depend on ansi_slice