I like the idea of using `takeWhile`, and it would eliminate the additional config param, but I think that what I do have is robust and fast. In addition, takeWhile could consume the entire string and introduce consequences. I'm not sold, unless you feel strongly about it. :-)