摘要: ruby条件运算符 c = (a<b) ? a : b 当a<b时取c=a,否则取c=b 使用范围运算符截取字符串 txt = "cardithea" puts txt[0..3] puts txt[0...3] 转整数to_i 转浮点数to_f 转字符串to_s 对5.5做四舍五入 5.5.rou 阅读全文
posted @ 2022-10-08 10:08 克莱比-Kirby 阅读(29) 评论(0) 推荐(0)