るりまサーチ

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

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

ライブラリ

検索結果

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