るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

キーワード

検索結果

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

StringIO#codepoints -> Enumerator (21102.0)

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

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

@see IO#each_codepoint

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

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

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

@see IO#each_codepoint

String#each_codepoint -> Enumerator (21018.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 (21018.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 -> Enumerator (6002.0)

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

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

@see IO#each_codepoint

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

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

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

@see IO#each_codepoint

NEWS for Ruby 2.0.0 (126.0)

NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...る使用されていない変数は警告しなくなりました

=== 組み込みクラスの更新

* ARGF.class
* 追加: ARGF.class#codepoints, ARGF.class#each_codepoint
IO にある同名のメソッドに対応します

* Array
* 追加: Array#bsearch 二分探索します...
...* String
* 追加: String#b エンコーディングを ASCII-8BIT に設定したコピーされた文字列を返します
* 返り値変更:
* String#lines Enumerator ではなく Array を返します
* String#chars Enumerator ではなく Array を返します
* String...
...s refinements into the current file or
eval string. [experimental]

=== 組み込みクラスの互換性 (機能追加とバグ修正を除く)

* Array#values_at
上を参照

* String#lines, String#chars, String#codepoints, String#bytes
これらのメソッドはもはや Enu...

正規表現 (52.0)

正規表現 * metachar * expansion * char * anychar * string * str * quantifier * capture * grouping * subexp * selector * anchor * cond * option * encoding * comment * free_format_mode * absenceop * list * specialvar * references

...正規表現
* metachar
* expansion
* char
* anychar
* string
* str
* quantifier
* capture
* grouping
* subexp
* selector
* anchor
* cond
* option
* encoding
* comment
* free_format_mode
* absenceop
* list
* specialvar
* references


正規表現(regular ex...
...以外の
その文字列そのものにマッチするような文字列があります。
前者をメタ文字列(meta string)、後者をリテラル(文字列)(literal string)と呼びます。

//emlist[][ruby]{
/京都|大阪|神戸/
//}

という正規表現においては、「京都」「...
...く任意の1文字にマッチします。

ただし、オプション m によって改行にもマッチするようになります。

===[a:string] 文字クラス

文字クラス(character class)
とは角括弧 [ と ] で囲まれ、1個以上の文字を列挙したもので、
いずれ...

絞り込み条件を変える