removePrefix method

  1. @useResult
String removePrefix(
  1. String prefix
)

Removes prefix from the start if present; otherwise returns this.

Implementation

@useResult
String removePrefix(String prefix) => startsWith(prefix) ? substringSafe(prefix.length) : this;