るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

検索結果

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