るりまサーチ (Ruby 2.1.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.194秒)
トップページ > 種類:インスタンスメソッド[x] > クエリ:l[x] > クエリ:p[x] > クエリ:open[x] > バージョン:2.1.0[x] > クエリ:each_codepoint[x]

別のキーワード

  1. _builtin open
  2. socket open
  3. csv open
  4. tempfile open
  5. zlib open

ライブラリ

クラス

検索結果

IO#each_codepoint {|c| ... } -> self (72964.0)

IO の各コードポイントに対して繰り返しブロックを呼びだします。

IO の各コードポイントに対して繰り返しブロックを呼びだします。

ブロックの引数にはコードポイントを表す整数が渡されます。

ブロックを省略した場合には、Enumerator を返します。

//emlist[例][ruby]{
IO.write("testfile", "abcdeあ")
File.open("testfile") do |f|
f.each_codepoint { |i| p i }
end
# => 97
# 98
# 99
# 100
# 101
# 12354
//}