wrapAnsi function

String wrapAnsi(
  1. String text,
  2. int columns, {
  3. bool? trim,
  4. bool? wordWrap,
  5. bool? hard,
})

Implementation

String wrapAnsi(
  String text,
  int columns, {
  bool? trim,
  bool? wordWrap,
  bool? hard,
}) {
  String exec(String text) =>
      _exec(text, columns, trim: trim, wordWrap: wordWrap, hard: hard);
  return nfc(text).split(_crlfOrLf).map(exec).join('\n');
}