Plus you have no bounds checking in your loop and it may walk off the end and segfault.
And lambda functions do not make code easily readable or supportable no matter if it is the rage or not. So stick with simple WHITESPACE.contains() and increment and bounds check to make it clear what is going on. The python code does this for exactly this reason.
Last edited by KevinH; 07-21-2016 at 06:22 PM.
|