dropString function

String dropString(
  1. int n,
  2. String s
)

Drop first n characters.

Implementation

String dropString(int n, String s) {
  if (n <= 0) {
    return s;
  }
  if (s.isEmpty || n >= s.length) {
    return '';
  }
  return s.substring(n);
}