With delete or delete!, you can delete characters from a string : delete « String « Ruby






With delete or delete!, you can delete characters from a string


puts "That's call folks!".delete "c" 

 








Related examples in the same category

1.Get rid of that extra l in alll:
2.use two ls instead of one for delete method
3.negate all or part of an argument with the caret (^), similar to its use in regular expressions
4.When there is more than one argument, take the intersection.