|
> Your code will match the first parameter that has <param> as a suffix, no necessarily <param> exactly Depending on your requirements, that might be a feature. > It also doesn't handle any percent encoding. This does literal matches, so yes you would need to pass the param already percent encoded. This is a trade off I did, not for that case, but for similar issues. I don't like non-ASCII in my source code, so I would want to encode this in some way anyway. But you are right, you shouldn't put this into a generic library. Whether it suffices for your project or not, depends on your requirements. |
Written standard be damned; I’ll just bang out something that vaguely looks like it handles the main cases I can remember off the top of my head. What could go wrong?