chomp

来源:互联网 发布:2017年病退工资的算法 编辑:程序博客网 时间:2024/06/05 23:55
require "PP"
PP::pp "hello".chomp #=> "hello"
PP::pp "hello/n".chomp #=> "hello"
PP::pp "hello/r/n".chomp #=> "hello"
PP::pp "hello/n/r".chomp #=> "hello/n"
PP::pp "hello/r".chomp #=> "hello"