Day 16: Exceptions – String to Integer STRING.to_i = 0 S = gets.strip print (S.to_i > 0) ? S : ‘Bad String’ 转载请注明:XAMPP中文组官网 » Day 15