Refactored StringHelper.