Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add Str::start() and str_start helper function #20569
What's life if you can't PR string helper functions - amiright?
With some naming help from twitter and @adamwathan, I planned on PRing
I often need this sort of thing when dealing with urls and paths. Hopefully the need is felt.
Long live the string helper!
Should benchmark the regex implementation in this and
If the code was significantly simpler with the regex I wouldn't even say anything, but actually feels more complicated than this:
Maybe there's some other reason it needs to be fancy though? Entirely possible!
(FWIW I would have PR'd it the exact same way you did, to be clear