RLML::EncodedString (Class)

In: rlml.rb
Parent: String

EncodedString is the class used to store strings and their encoding. It behaves just like an ordinary string, with two exceptions:

  1. You need to pass it’s encoding on initialization
  2. to_s takes an additional, optional parameter to convert the string into the given encoding.

Methods

new   to_s  

Attributes

encoding  [R] 

Public Class methods

Create a new EncodedString using the data in string and the encoding.

Public Instance methods

Return a copy of the string converted to encoding (if given).

[Validate]