るりまサーチ (Ruby 2.4.0)

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

別のキーワード

  1. string []=
  2. string slice
  3. string slice!
  4. string []
  5. string gsub

ライブラリ

クラス

検索結果

String#each_codepoint -> Enumerator (81664.0)

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

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

UTF-8/UTF-16(BE|LE)/UTF-32(BE|LE) 以外のエンコーディングに対しては
各文字のバイナリ表現由来の値になります。

//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, 1...

StringIO#each_codepoint -> Enumerator (54628.0)

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

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

@see IO#each_codepoint

StringIO#codepoints -> Enumerator (9328.0)

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

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

@see IO#each_codepoint