るりまサーチ (Ruby 2.1.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.081秒)
トップページ > クエリ:String[x] > バージョン:2.1.0[x] > クエリ:a[x] > モジュール:Kconv[x]

別のキーワード

  1. string []=
  2. string []
  3. string slice
  4. string slice!
  5. string gsub

ライブラリ

キーワード

検索結果

Kconv.#tolocale(str) -> String (18643.0)

文字列 str のエンコーディングをロケールエンコーディングに変換して返します。

...ドされた文字列を展開し、
いわゆる半角カナを全角に変換します。
これらを変換したくない場合は、 String#encode
を使ってください。

Kconv
.kconv(str, Encoding.locale_charmap)と同じです。

@param str 変換元の文字列
@see String#tolocale...

Kconv.#kconv(str, out_code, in_code = Kconv::AUTO) -> String (625.0)

文字列 str のエンコーディングを out_code に変換したものを 返します。in_code も指定されていたら str のエンコーディングが in_code だとして動作します。

...し、
いわゆる半角カナを全角に変換します。
これらを変換したくない場合は、 NKF.#nkf を使ってください。

@param str 変換元の文字列
@param out_code 変換後のエンコーディング
@param in_code strのエンコーディング

@see String#kconv...

Kconv.#isjis(str) -> bool (40.0)

文字列 str が ISO-2022-JP なバイト列として正当であるかどうかを判定します。

...列として正当であるかどうかを判定します。

@param str 判定対象の文字列
@see String#isjis

//emlist[例][ruby]{
require 'kconv'

euc_str = "\
\xa5\xaa\xa5\xd6\xa5\xb8\xa5\xa7\xa5\xaf\xa5\xc8\xbb\xd8\xb8\xfe\
\xa5\xd7\xa5\xed\xa5\xb0\xa5\xe9\xa5\xdf\xa5\xf3\xa5\xb0\xb8\xc0\x...