るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method gets
  4. irb/input-method new
  5. matrix -

ライブラリ

クラス

検索結果

String#codepoints -> [Integer] (18220.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 {|codepoint| block } -> self (18220.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...

IO#codepoints -> Enumerator (18208.0)

このメソッドは obsolete です。 代わりに IO#each_codepoint を使用してください。

...表示されます。

IO の各コードポイントに対して繰り返しブロックを呼びだします。

ブロックの引数にはコードポイントを表す整数が渡されます。

ブロックを省略した場合には、Enumerator を返します。


@
see IO#each_codepoint...

IO#codepoints {|c| ... } -> self (18208.0)

このメソッドは obsolete です。 代わりに IO#each_codepoint を使用してください。

...表示されます。

IO の各コードポイントに対して繰り返しブロックを呼びだします。

ブロックの引数にはコードポイントを表す整数が渡されます。

ブロックを省略した場合には、Enumerator を返します。


@
see IO#each_codepoint...

StringIO#codepoints -> Enumerator (18208.0)

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

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

@
see IO#each_codepoint...

絞り込み条件を変える

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

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

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

@
see IO#each_codepoint...

StringIO#each_codepoint -> Enumerator (3108.0)

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

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

@
see IO#each_codepoint...

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

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

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

@
see IO#each_codepoint...

String#each_codepoint -> Enumerator (142.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, 108, 111, 32, 42223, 41404, 42219, 42185]
//}

@
see String#codepoints...

String#each_codepoint {|codepoint| block } -> self (142.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, 108, 111, 32, 42223, 41404, 42219, 42185]
//}

@
see String#codepoints...

絞り込み条件を変える