Skip to content

Extracting a URL path parameter #33

Discussion options

You must be logged in to vote

I would suggest using a Uri Parser rather than a String Splitter for finding the URL path components. Either of the indexing approaches you've outlined sound reasonable; I personally prefer option 1 since it's more concise by one module (or two; if you're lucky enough to be passing the output into a collection, you can slice down to a length-one array and skip the indexer), but option 2 might be more legible.

Replies: 2 comments

Comment options

eschenfeldt
Mar 5, 2025
Collaborator Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by eschenfeldt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants