I like your method to sanitize this string. The addition of the check for s=0 was good to add.