Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/kconv.rb
Instance Method Summary collapse
-
#iseuc ⇒ Object
call-seq: String#iseuc => true or false.
-
#isjis ⇒ Object
call-seq: String#isjis => true or false.
-
#issjis ⇒ Object
call-seq: String#issjis => true or false.
-
#isutf8 ⇒ Object
call-seq: String#isutf8 => true or false.
-
#kconv(to_enc, from_enc = nil) ⇒ Object
call-seq: String#kconv(to_enc, from_enc).
-
#toeuc ⇒ Object
call-seq: String#toeuc => string.
-
#tojis ⇒ Object
call-seq: String#tojis => string.
-
#tolocale ⇒ Object
call-seq: String#tolocale => string.
-
#tosjis ⇒ Object
call-seq: String#tosjis => string.
-
#toutf16 ⇒ Object
call-seq: String#toutf16 => string.
-
#toutf32 ⇒ Object
call-seq: String#toutf32 => string.
-
#toutf8 ⇒ Object
call-seq: String#toutf8 => string.
Instance Method Details
#kconv(to_enc, from_enc = nil) ⇒ Object
call-seq:
String#kconv(to_enc, from_enc)
Convert self
to to_enc
. to_enc
and from_enc
are given as constants of Kconv or Encoding objects.
204 205 206 207 |
# File 'lib/kconv.rb', line 204 def kconv(to_enc, from_enc=nil) from_enc = self.encoding if !from_enc && self.encoding != Encoding.list[0] Kconv::kconv(self, to_enc, from_enc) end |