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

str.reverse! â str Instance Public methods Reverses str in place

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

str.dump â new_str Instance Public methods Produces a version of str

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

str.slice(index) â new_str or nilstr.slice(start, length) â new_str or nilstr.slice(range) â new_str or nilstr.slice(regexp)

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

str.encode!(encoding [, options] ) â strstr.encode!(dst_encoding, src_encoding [, options] ) â str Instance

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

str == obj â true or false Instance Public methods EqualityâIf obj

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

str.ascii_only? â true or false Instance Public methods Returns true for a

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