123456789_123456789_123456789_123456789_123456789_

Class: String

Relationships & Source Files
Inherits: Object
Defined in: ext/nkf/lib/kconv.rb

Instance Method Summary

Instance Method Details

#iseucBoolean

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

[ GitHub ]

  
# File 'ext/nkf/lib/kconv.rb', line 264

def iseuc;	Kconv.iseuc(self) end

#isjisBoolean

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

[ GitHub ]

  
# File 'ext/nkf/lib/kconv.rb', line 276

def isjis;	Kconv.isjis(self) end

#issjisBoolean

Returns whether self's encoding is Shift_JIS or not.

[ GitHub ]

  
# File 'ext/nkf/lib/kconv.rb', line 270

def issjis;	Kconv.issjis(self) end

#isutf8Boolean

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

[ GitHub ]

  
# File 'ext/nkf/lib/kconv.rb', line 282

def isutf8;	Kconv.isutf8(self) end

#kconv(to_enc, from_enc)

Convert self to to_enc. to_enc and from_enc are given as constants of ::Kconv or Encoding objects.

[ GitHub ]

  
# File 'ext/nkf/lib/kconv.rb', line 205

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

#toeucString

Convert self to EUC-JP

[ GitHub ]

  
# File 'ext/nkf/lib/kconv.rb', line 224

def toeuc; Kconv.toeuc(self) end

#tojisString

Convert self to ISO-2022-JP

[ GitHub ]

  
# File 'ext/nkf/lib/kconv.rb', line 218

def tojis; Kconv.tojis(self) end

#tolocaleString

Convert self to locale encoding

[ GitHub ]

  
# File 'ext/nkf/lib/kconv.rb', line 254

def tolocale; Kconv.tolocale(self) end

#tosjisString

Convert self to Shift_JIS

[ GitHub ]

  
# File 'ext/nkf/lib/kconv.rb', line 230

def tosjis; Kconv.tosjis(self) end

#toutf16String

Convert self to UTF-16

[ GitHub ]

  
# File 'ext/nkf/lib/kconv.rb', line 242

def toutf16; Kconv.toutf16(self) end

#toutf32String

Convert self to UTF-32

[ GitHub ]

  
# File 'ext/nkf/lib/kconv.rb', line 248

def toutf32; Kconv.toutf32(self) end

#toutf8String

Convert self to UTF-8

[ GitHub ]

  
# File 'ext/nkf/lib/kconv.rb', line 236

def toutf8; Kconv.toutf8(self) end