るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

検索結果

String#codepoints {|codepoint| block } -> self (45320.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] (45220.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...

StringIO#codepoints {|codepoint| ... } -> self (27302.0)

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

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

@see IO#each_codepoint...

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

StringIO#codepoints -> Enumerator (27202.0)

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

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

@see IO#each_codepoint...

絞り込み条件を変える

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

StringIO#each_codepoint {|codepoint| ... } -> self (12202.0)

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

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

@see IO#each_codepoint...

StringIO#each_codepoint -> Enumerator (12102.0)

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

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

@see IO#each_codepoint...