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

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

str.each_byte {|fixnum| block } â strstr.each_byte â an_enumerator Instance Public

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

str.setbyte(index, integer) â integer Instance Public methods modifies the

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

str.squeeze!([other_str]*) â str or nil Instance Public methods Squeezes

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

str.to_sym â symbol Instance Public methods Returns the Symbol

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

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

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

str.chop! â str or nil Instance Public methods Processes str as

2025-01-10 15:47:30