るりまサーチ

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

別のキーワード

  1. openssl integer
  2. asn1 integer
  3. _builtin integer
  4. integer downto
  5. integer digits

ライブラリ

検索結果

String#codepoints -> [Integer] (18210.0)

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

...".codepoints
# => [104, 101, 108, 108, 111, 32, 12431, 12540, 12427, 12393]
//}

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

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

@see String#eac...

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

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

...".codepoints
# => [104, 101, 108, 108, 111, 32, 12431, 12540, 12427, 12393]
//}

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

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

@see String#eac...