take method

String take(
  1. int count
)

Implementation

String take(int count) =>
    ((count > 0)
        ? this?.substring(0, min(size, count))
        : this?.substring(max(0, size + count), size)) ??
    '';