るりまサーチ

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

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. fiddle type_uintptr_t
  4. fiddle type_size_t
  5. fiddle type_intptr_t

ライブラリ

検索結果

String#each_codepoint {|codepoint| block } -> self (24317.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, 124...
...31, 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 -> Enumerator (24217.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, 124...
...31, 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#codepoints {|codepoint| block } -> self (6247.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...

String#codepoints -> [Integer] (6147.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...