Refactor 'string to integer (atoi)'.