るりまサーチ

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

別のキーワード

  1. _builtin each
  2. _builtin each_line
  3. prime each
  4. each
  5. tsort tsort_each

ライブラリ

クラス

キーワード

検索結果

<< 1 2 > >>

ARGF.class#each_codepoint { |c| ... } -> self (18237.0)

self の各コードポイントに対して繰り返しブロックを呼びだします。

...
self
の各コードポイントに対して繰り返しブロックを呼びだします。

ブロックの引数にはコードポイントを表す整数が渡されます。

ブロックを省略した場合には、Enumerator を返します。

例:
# $ echo "line1\n" > test1.txt
# $ ec...
...ho "line2\n" > test2.txt
# $ ruby test.rb test1.txt test2.txt

# test.rb
ARGF.each_codepoint # => #<Enumerator: ARGF:each_codepoint>
ARGF.each_codepoint{|e|print e, ","} # => 108,105,110,101,49,10,108,105,110,101,50,10,...

String#each_codepoint {|codepoint| block } -> self (18215.0)

文字列の各コードポイントに対して繰り返します。

...の値になります。

//emlist[例][ruby]{
#coding:UTF-8
"hello わーるど".each_codepoint.to_a
# => [104, 101, 108, 108, 111, 32, 12431, 12540, 12427, 12393]
"hello わーるど".encode('euc-jp').each_codepoint.to_a
# => [104, 101, 108, 108, 111, 32, 42223, 41404, 42219, 42185]
//}

@see Stri...

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

StringIO#each_codepoint {|codepoint| ... } -> self (18209.0)

自身の各コードポイントに対して繰り返します。

...自身の各コードポイントに対して繰り返します。

@see IO#each_codepoint...

ARGF.class#each_codepoint -> Enumerator (18137.0)

self の各コードポイントに対して繰り返しブロックを呼びだします。

...
self
の各コードポイントに対して繰り返しブロックを呼びだします。

ブロックの引数にはコードポイントを表す整数が渡されます。

ブロックを省略した場合には、Enumerator を返します。

例:
# $ echo "line1\n" > test1.txt
# $ ec...
...ho "line2\n" > test2.txt
# $ ruby test.rb test1.txt test2.txt

# test.rb
ARGF.each_codepoint # => #<Enumerator: ARGF:each_codepoint>
ARGF.each_codepoint{|e|print e, ","} # => 108,105,110,101,49,10,108,105,110,101,50,10,...

絞り込み条件を変える

String#each_codepoint -> Enumerator (18115.0)

文字列の各コードポイントに対して繰り返します。

...の値になります。

//emlist[例][ruby]{
#coding:UTF-8
"hello わーるど".each_codepoint.to_a
# => [104, 101, 108, 108, 111, 32, 12431, 12540, 12427, 12393]
"hello わーるど".encode('euc-jp').each_codepoint.to_a
# => [104, 101, 108, 108, 111, 32, 42223, 41404, 42219, 42185]
//}

@see Stri...

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

StringIO#each_codepoint -> Enumerator (18109.0)

自身の各コードポイントに対して繰り返します。

...自身の各コードポイントに対して繰り返します。

@see IO#each_codepoint...

StringIO#each_codepoint {|codepoint| ... } -> self (15210.0)

自身の各コードポイントに対して繰り返します。

...自身の各コードポイントに対して繰り返します。

@see IO#each_codepoint...

StringIO#each_codepoint -> Enumerator (15110.0)

自身の各コードポイントに対して繰り返します。

...自身の各コードポイントに対して繰り返します。

@see IO#each_codepoint...

絞り込み条件を変える

String#codepoints {|codepoint| block } -> self (145.0)

文字列の各コードポイントの配列を返します。(self.each_codepoint.to_a と同じです)

...トの配列を返します。(self.each_codepoint.to_a と同じです)

//emlist[例][ruby]{
#coding:UTF-8
"hello わーるど".codepoints
# => [104, 101, 108, 108, 111, 32, 12431, 12540, 12427, 12393]
//}

ブロックが指定された場合は String#each_codepoint と同じように動作し...
...ます。

Ruby 2.6 までは deprecated の警告が出ますが、Ruby 2.7 で警告は削除されました。

@see String#each_codepoint...

IO#codepoints {|c| ... } -> self (123.0)

このメソッドは obsolete です。 代わりに IO#each_codepoint を使用してください。

...このメソッドは obsolete です。
代わりに IO#each_codepoint を使用してください。

使用すると警告メッセージが表示されます。

IO の各コードポイントに対して繰り返しブロックを呼びだします。

ブロックの引数にはコードポ...
...イントを表す整数が渡されます。

ブロックを省略した場合には、Enumerator を返します。


@see IO#each_codepoint...
<< 1 2 > >>