Contents

trimPrefix(_:)

Removes the initial elements matching the regex from the start of this collection, if the initial elements match, using the given closure to create the regex.

Declaration

mutating func trimPrefix(@RegexComponentBuilder _ content: () -> some RegexComponent)

Parameters

  • content:

    A closure that returns the regex to search for at the start of this collection.