るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.031秒)
トップページ > クエリ:Enumerator[x] > クエリ:end[x] > クエリ:each_codepoint[x]

別のキーワード

  1. _builtin end
  2. ripper end_seen?
  3. _builtin exclude_end?
  4. _builtin end_with?
  5. handler end_document

ライブラリ

クラス

検索結果

IO#each_codepoint -> Enumerator (18221.0)

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 (18121.0)

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
//}...