るりまサーチ (Ruby 2.4.0)

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

別のキーワード

  1. _builtin to_s
  2. openssl to_der
  3. openssl to_s
  4. _builtin to_a
  5. openssl to_pem

キーワード

検索結果

Symbol#length -> Integer (334.0)

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

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

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

:foo.length #=> 3

@see String#length, String#size

Symbol#size -> Integer (334.0)

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

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

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

:foo.length #=> 3

@see String#length, String#size

Symbol#=~(other) -> Integer | nil (331.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#=~