るりまサーチ (Ruby 3.1)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.028秒)

別のキーワード

  1. enumerator each
  2. each enumerator
  3. enumerator with_index
  4. enumerator with_object
  5. enumerator new

クラス

検索結果

String#each_char -> Enumerator (328.0)

文字列の各文字に対して繰り返します。

文字列の各文字に対して繰り返します。

たとえば、
//emlist[][ruby]{
"hello世界".each_char {|c| print c, ' ' }
//}
は次のように出力されます。
h e l l o 世 界

@see String#chars

String#each_char {|cstr| block } -> self (28.0)

文字列の各文字に対して繰り返します。

文字列の各文字に対して繰り返します。

たとえば、
//emlist[][ruby]{
"hello世界".each_char {|c| print c, ' ' }
//}
は次のように出力されます。
h e l l o 世 界

@see String#chars