String utility methods #
Escape ’%’ characters in this string. Returns self.
Example:
a = 'a%b'.escape_format! a.escape_format! a #=> 'a%%b'
return a copy of this string with HTML special characters escaped
Example:
str = '<b>Rip & "Burn"</b>'.escape_html str #=> "<b>Rip &amp "Burn"</b>"
Return copy of string with lines reflowed for the given terminal width.
Example:
str = "this is a really long string it won't fit" str.reflow(22) #=> "this is a really long\nstring it won't fit"
Return copy of string with all HTML tags stripped.
Example:
"<a href='sadf'>blargh</a>".strip_tags #=> 'blargh'