Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/u-1.0.rb

Overview

Ruby’s built-in String class.

Instance Method Summary collapse

Instance Method Details

#uU::String

Note:

The receiver will receive #encode(Encoding::UTF_8)#freeze and you should thus probably not use the receiver after invoking #u on it.

Returns A wrapper around the receiver that provides proper Unicode handling of its content.

Returns:

  • (U::String)

    A wrapper around the receiver that provides proper Unicode handling of its content



17
18
19
# File 'lib/u-1.0.rb', line 17

def u
  U::String.new(self)
end