[minor] Directly return 0 when the input string is '0'
Merge pull request #1 from lpinca/fix/edge-case

Directly return 0 when the input string is '0'