るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.101秒)
トップページ > クエリ:String[x] > クエリ:ruby[x] > 種類:インスタンスメソッド[x] > クエリ:string[x] > クラス:String[x] > クエリ:encode[x] > クエリ:each_codepoint[x]

別のキーワード

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

ライブラリ

検索結果

String#each_codepoint -> Enumerator (48140.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 String#codepoints...

String#each_codepoint {|codepoint| block } -> self (48140.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 String#codepoints...