In Files

  • nkf/lib/kconv.rb

Class/Module Index [+]

Quicksearch

String

Public Instance Methods

String#iseuc => true or false click to toggle source

Returns whether self's encoding is EUC-JP or not.

 
               # File nkf/lib/kconv.rb, line 263
def iseuc;    Kconv.iseuc(self) end
            
String#isjis => true or false click to toggle source

Returns whether self's encoding is ISO-2022-JP or not.

 
               # File nkf/lib/kconv.rb, line 275
def isjis;    Kconv.isjis(self) end
            
String#issjis => true or false click to toggle source

Returns whether self's encoding is Shift_JIS or not.

 
               # File nkf/lib/kconv.rb, line 269
def issjis;   Kconv.issjis(self) end
            
String#isutf8 => true or false click to toggle source

Returns whether self's encoding is UTF-8 or not.

 
               # File nkf/lib/kconv.rb, line 281
def isutf8;   Kconv.isutf8(self) end
            
String#kconv(to_enc, from_enc) click to toggle source

Convert self to out_code. out_code and in_code are given as constants of Kconv.

 
               # File nkf/lib/kconv.rb, line 204
def kconv(to_enc, from_enc=nil)
  form_enc = self.encoding if !from_enc && self.encoding != Encoding.list[0]
  Kconv::kconv(self, to_enc, from_enc)
end
            
String#toeuc => string click to toggle source

Convert self to EUC-JP

 
               # File nkf/lib/kconv.rb, line 223
def toeuc; Kconv.toeuc(self) end
            
String#tojis => string click to toggle source

Convert self to ISO-2022-JP

 
               # File nkf/lib/kconv.rb, line 217
def tojis; Kconv.tojis(self) end
            
String#tolocale => string click to toggle source

Convert self to locale encoding

 
               # File nkf/lib/kconv.rb, line 253
def tolocale; Kconv.tolocale(self) end
            
String#tosjis => string click to toggle source

Convert self to Shift_JIS

 
               # File nkf/lib/kconv.rb, line 229
def tosjis; Kconv.tosjis(self) end
            
String#toutf16 => string click to toggle source

Convert self to UTF-16

 
               # File nkf/lib/kconv.rb, line 241
def toutf16; Kconv.toutf16(self) end
            
String#toutf32 => string click to toggle source

Convert self to UTF-32

 
               # File nkf/lib/kconv.rb, line 247
def toutf32; Kconv.toutf32(self) end
            
String#toutf8 => string click to toggle source

Convert self to UTF-8

 
               # File nkf/lib/kconv.rb, line 235
def toutf8; Kconv.toutf8(self) end