Type:
Class

Rake extension methods for String.

A String object holds and manipulates an arbitrary sequence of bytes, typically representing characters. String objects may be created using String::new or as literals.

Because of aliasing issues, users of strings should be aware of the methods that modify the contents of a String object. Typically, methods with names ending in “!'' modify their receiver, while those without a “!'' return a new String. However, there are exceptions, such as String#[]=.

<=>
  • References/Ruby on Rails/Ruby/Classes/String

string other_string â -1, 0, +1 or nil Instance Public methods ComparisonâReturns

2025-01-10 15:47:30
rstrip!
  • References/Ruby on Rails/Ruby/Classes/String

str.rstrip! â self or nil Instance Public methods Removes trailing whitespace

2025-01-10 15:47:30
gsub
  • References/Ruby on Rails/Ruby/Classes/String

str.gsub(pattern, replacement) â new_strstr.gsub(pattern, hash) â new_strstr.gsub(pattern) {|match| block } â new_strstr

2025-01-10 15:47:30
center
  • References/Ruby on Rails/Ruby/Classes/String

str.center(width, padstr=' ') â new_str Instance Public methods Centers str

2025-01-10 15:47:30
upcase
  • References/Ruby on Rails/Ruby/Classes/String

str.upcase â new_str Instance Public methods Returns a copy of str

2025-01-10 15:47:30
chomp
  • References/Ruby on Rails/Ruby/Classes/String

str.chomp(separator=$/) â new_str Instance Public methods Returns a new String

2025-01-10 15:47:30
swapcase
  • References/Ruby on Rails/Ruby/Classes/String

str.swapcase â new_str Instance Public methods Returns a copy of str

2025-01-10 15:47:30
downcase!
  • References/Ruby on Rails/Ruby/Classes/String

str.downcase! â str or nil Instance Public methods Downcases the contents

2025-01-10 15:47:30
kjust
  • References/Ruby on Rails/Ruby/Classes/String

kjust(len) Instance Public methods

2025-01-10 15:47:30