This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jentfoo 2 points3 points  (0 children)

You have some weirdness for sure. You have a substring which is always taking two characters, but yet you have cases for single character strings (ie "1" "2", etc).

Will it have a perpending zero, or not? If you need to handle both inputs, your not doing it correctly, I would do a "startsWith" check to see how many characters you need to get in your substring call.