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

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

str.force_encoding(encoding) â str Instance Public methods Changes the encoding

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

str.chomp!(separator=$/) â str or nil Instance Public methods Modifies str

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

str.intern â symbol Instance Public methods Returns the Symbol

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

str.tr!(from_str, to_str) â str or nil Instance Public methods Translates

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

str.codepoints â an_array Instance Public methods Returns an array of the

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

str.each_codepoint {|integer| block } â strstr.each_codepoint â an_enumerator Instance

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

str.capitalize! â str or nil Instance Public methods Modifies str

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

str.rpartition(sep) â [head, sep, tail]str.rpartition(regexp) â [head, match, tail] Instance

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

str.lines(separator=$/) â an_array Instance Public methods Returns an array

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

pathmap(spec=nil, &block) Instance Public methods Map the path according

2025-01-10 15:47:30