るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.189秒)
トップページ > クエリ:t[x] > クエリ:Ruby[x] > クエリ:String[x] > クエリ:ruby[x] > クエリ:u[x] > 種類:インスタンスメソッド[x] > クエリ:each_codepoint[x]

別のキーワード

  1. rbconfig ruby
  2. fiddle build_ruby_platform
  3. fiddle ruby_free
  4. rubygems/defaults ruby_engine
  5. rake ruby

ライブラリ

クラス

検索結果

String#each_codepoint -> Enumerator (45333.0)

文字列の各コードポイントに対して繰り返します。

...ントに対して繰り返します。

U
TF-8/UTF-16(BE|LE)/UTF-32(BE|LE) 以外のエンコーディングに対しては
各文字のバイナリ表現由来の値になります。

//emlist[例][ruby]{
#coding:UTF-8
"hello わーるど".each_codepoint.to_a
# => [104, 101, 108, 108, 111, 32, 124...
...31, 12540, 12427, 12393]
"hello わーるど".encode('euc-jp').each_codepoint.to_a
# => [104, 101, 108, 108, 111, 32, 42223, 41404, 42219, 42185]
//}

@see String#codepoints...