るりまサーチ (Ruby 2.1.0)

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

別のキーワード

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

クラス

検索結果

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