elm / url

Build and parse URLs. Useful for HTTP and "routing" in single-page apps (SPAs)
https://package.elm-lang.org/packages/elm/url/latest/
BSD 3-Clause "New" or "Revised" License
74 stars 43 forks source link

Allow ignoring the rest of path #19

Open malaire opened 6 years ago

malaire commented 6 years ago

For my current app I need a parser which only checks that some initial segments of path match the parser, and then ignore the rest of the segments, if any, and regardless of how many there are.

This doesn't seem to be possible currently. Custom parser doesn't help as it would require me to know exactly how many segments I want to ignore, which I don't know.

Erudition commented 5 years ago

Yeah that's really custom, sounds like you should just parse it yourself with String.split "/"