Safe integer parsing in Ruby

后端 未结 8 671
眼角桃花
眼角桃花 2020-12-02 06:51

I have a string, say \'123\', and I want to convert it to the integer 123.

I know you can simply do some_string.to_i, but that

8条回答
提交回复
热议问题