toDebugString method

  1. @nonVirtual
String toDebugString(
  1. int cols
)

Implementation

@nonVirtual
String toDebugString(int cols) {
  final result = StringBuffer();
  final length = getTrimmedLength();
  for (int i = 0; i < max(cols, length); i++) {
    var code = cellGetContent(i);
    if (code == 0) {
      if (cellGetWidth(i) == 0) {
        code = '_'.runes.first;
      } else {
        code = cellGetWidth(i).toString().runes.first;
      }
    }
    result.writeCharCode(code);
  }
  return result.toString();
}