@trashpanda001/helpers
    Preparing search index...

    Function unprefix

    • Removes a prefix from a string.

      Parameters

      • string: string

        the string to unprefix

      • prefix: string | RegExp

        the prefix to remove

      Returns string

      the string without the prefix

      import { unprefix } from "@trashpanda001/helpers/string"

      unprefix("The Beatles", "The ")
      // "Beatles"
      unprefix("The Beatles", /^(the|a|an) /i)
      // "Beatles"