[nitpick]
I think substring is a little misleading here. I can think of 2 other methods that would be more appropriate.