Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integer Placeholder Notation #179

Open
everclear opened this issue Feb 5, 2016 · 1 comment
Open

Integer Placeholder Notation #179

everclear opened this issue Feb 5, 2016 · 1 comment
Labels

Comments

@everclear
Copy link

Hi,

Has any thought been given to a placeholder notation that only permits an integer value? I would see this a useful addition. In a lot of cases you will know upfront that you need an int, so it would be good to 404 the request early.

I have written a splitParamInt function that could be used when matching..

for len(remaining) > i && remaining[i] != '/' && (remaining[i] == '0' || remaining[i] == '1' ||..

Doesn't look very pretty, but I imagine it's as quick as you are going to get.

Just putting it out there for discussion. Is it worth while? What should the prefix be? Happy to put in a pull request it's got merit.

@everclear everclear changed the title Interger Placeholder Notation Integer Placeholder Notation Feb 5, 2016
@tabacco
Copy link

tabacco commented Jun 29, 2016

I would love to see this - not sure what the best syntax is, though. Too bad # is already spoken for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants