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#[]=.

to_str
  • References/Ruby on Rails/Ruby/Classes/String

str.to_str â str Instance Public methods Returns the receiver.

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

str.tr_s!(from_str, to_str) â str or nil Instance Public methods Performs

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

str.end_with?([suffixes]+) â true or false Instance Public methods Returns

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

str.index(substring [, offset]) â fixnum or nilstr.index(regexp [, offset]) â fixnum or nil Instance

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
new
  • References/Ruby on Rails/Ruby/Classes/String

String.new(str="") â new_str Class Public methods Returns a new string object

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

str.length â integer Instance Public methods Returns the character length

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

str.casecmp(other_str) â -1, 0, +1 or nil Instance Public methods Case-insensitive

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

to_a() Instance Public methods

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

str.reverse â new_str Instance Public methods Returns a new string with the

2025-01-10 15:47:30