irb(main):001:0> a = "he l lo !"
=> "he l lo !"
irb(main):002:0> a.delete!(" ", "a")
=> nil
irb(main):003:0> a
=> "he l lo !"
irb(main):004:0> a.delete!(" ")
=> "hello!"
irb(main):005:0>
irb(main):001:0> "he ll o\n".delete('\n')
=> "he ll o\n"
irb(main):002:0> "he ll o\n".delete("\n")
=> "he ll o"
irb(main):003:0> printf('\n')
\n=> nil
irb(main):004:0> printf("\n")
=> nil
irb(main):005:0>
Subscribe to Posts [Atom]