I would remove the 0 case - `$iCharacterCount` should not be allowed to be 0.