@ac-essentials/misc-util
    Preparing search index...

    Function patternTrim

    • Trims the specified pattern from the start and end of the string.

      This method is like String.prototype.trim(), but allows specifying a custom pattern.

      Parameters

      • string: string

        The string to be trimmed.

      • Optionalpattern: string

        The pattern to be trimmed. If not provided, whitespace and line terminators are trimmed.

      Returns string

      The trimmed string.