chop removes the last character (a quote) with abandon : chop « String « Ruby






chop removes the last character (a quote) with abandon


joe = "Joe joe"

puts joe.chop! 

 








Related examples in the same category

1.Call shop function from string class
2.chop removes trailing character or line terminator (\n, \r, or \r\n)