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

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

str.hash â fixnum Instance Public methods Return a hash based on the string's

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

str[index] â new_str or nilstr[start, length] â new_str or nilstr[range] â new_str or nilstr[regexp]

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

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

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

str.unpack(format) â anArray Instance Public methods Decodes 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
to_c
  • References/Ruby on Rails/Ruby/Classes/String

str.to_c â complex Instance Public methods Returns a complex which denotes

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

str.next! â str Instance Public methods Equivalent to String#succ

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

str.rjust(integer, padstr=' ') â new_str Instance Public methods If integer

2025-01-10 15:47:30