3 ms·
I like this way to rewrite it when the end test is slow (I think this is correct syntax): for(int i=0, len=str.length(); i<len; i++) One evaluation and you do
by smackfu 15y ago
I like this way to rewrite it when the end test is slow (I think this is correct syntax):
for(int i=0, len=str.length(); i<len; i++)
One evaluation and you don't have an extra len variable hanging around.