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

str.ord â integer Instance Public methods Return the Integer

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