Editing Topic: RCR136 Project: RCR | RCRchive home

RCR 136: String#chomp(/regexp/)

submitted by anonymous on 2003-05-03 07:34:17


This is a legacy RCR. If this is your RCR, please resubmit it using the new format and process.


I think it would be a nice feature to be able to do something like str.chomp(/r?n/) to cut off both dos and unix style newlines. (This can already be done like str.subs(/r?n$/), but str.chomp(/re/) would look more like a chomp and be slightly simpler.)


Back to RCRchive.


RCR Submission page and RCRchive powered by Ruby, Apache, RuWiki (modified), and RubLog