@LiquidBoy:

 

btw, code 2 won't compile. There is no substr defined. I can't be sure he didn't allocate extra substr when it is not defined nor assigned in his code.

problem with code one is mostly bloated memory usage when the same style is used down the deep call stack.