るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.253秒)
トップページ > バージョン:2.6.0[x] > クラス:Symbol[x] > クエリ:_builtin[x] > クエリ:integer[x]

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

ライブラリ

キーワード

検索結果

Symbol#length -> Integer (24310.0)

シンボルに対応する文字列の長さを返します。

シンボルに対応する文字列の長さを返します。

(self.to_s.length と同じです。)

:foo.length #=> 3

@see String#length, String#size

Symbol#size -> Integer (24310.0)

シンボルに対応する文字列の長さを返します。

シンボルに対応する文字列の長さを返します。

(self.to_s.length と同じです。)

:foo.length #=> 3

@see String#length, String#size

Symbol#=~(other) -> Integer | nil (24307.0)

正規表現 other とのマッチを行います。

正規表現 other とのマッチを行います。

(self.to_s =~ other と同じです。)

@param other 比較対象のシンボルを指定します。

@return マッチが成功すればマッチした位置のインデックスを、そうでなければ nil を返します。

p :foo =~ /foo/ # => 0
p :foobar =~ /bar/ # => 3
p :foo =~ /bar/ # => nil

@see String#=~