removePrefix method

String removePrefix(
  1. String prefix
)

Removes prefix from the start of this string if present.

Implementation

String removePrefix(String prefix) =>
    startsWith(prefix) ? substring(prefix.length) : this;