Class String
In: nkf/lib/kconv.rb
Parent: Object

Methods

iseuc   issjis   isutf8   kconv   toeuc   tojis   tosjis   toutf16   toutf8  

Public Instance methods

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

Note don‘t expect this return value is MatchData.

[Source]

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

Returns whether self‘s encoding is Shift_JIS or not.

Note don‘t expect this return value is MatchData.

[Source]

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

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

Note don‘t expect this return value is MatchData.

[Source]

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

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

Note This method decode MIME encoded string and convert halfwidth katakana to fullwidth katakana. If you don‘t want to decode them, use NKF.nkf.

[Source]

# File nkf/lib/kconv.rb, line 277
  def kconv(out_code, in_code=Kconv::AUTO)
    Kconv::kconv(self, out_code, in_code)
  end

Convert self to EUC-JP

Note This method decode MIME encoded string and convert halfwidth katakana to fullwidth katakana. If you don‘t want it, use NKF.nkf(’-exm0’, str).

[Source]

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

Convert self to ISO-2022-JP

Note This method decode MIME encoded string and convert halfwidth katakana to fullwidth katakana. If you don‘t want it, use NKF.nkf(’-jxm0’, str).

[Source]

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

Convert self to Shift_JIS

Note This method decode MIME encoded string and convert halfwidth katakana to fullwidth katakana. If you don‘t want it, use NKF.nkf(’-sxm0’, str).

[Source]

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

Convert self to UTF-16

Note This method decode MIME encoded string and convert halfwidth katakana to fullwidth katakana. If you don‘t want it, use NKF.nkf(’-w16xm0’, str).

[Source]

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

Convert self to UTF-8

Note This method decode MIME encoded string and convert halfwidth katakana to fullwidth katakana. If you don‘t want it, use NKF.nkf(’-wxm0’, str).

[Source]

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

[Validate]

ruby-doc.org is hosted and run by James Britt and Happy Camper Studios, a Ruby application development company in Phoenix, Arizona. Ruby-doc.org was created in 2002 to promote the Ruby language and to help other Ruby hackers.

Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.

For more information on the Ruby programming language, visit ruby-lang.org.

Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.