るりまサーチ (Ruby 2.2.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.067秒)
トップページ > バージョン:2.2.0[x] > クエリ:open[x] > クエリ:file[x] > クエリ:each_codepoint[x]

別のキーワード

  1. _builtin file?
  2. _builtin file
  3. file chmod
  4. file chown
  5. file open

ライブラリ

クラス

検索結果

IO#each_codepoint -> Enumerator (54361.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
//}

IO#each_codepoint {|c| ... } -> self (54361.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
//}