るりまサーチ

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

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle type_size_t

ライブラリ

キーワード

検索結果

<< 1 2 3 ... > >>

Symbol#match(other) -> MatchData | nil (6201.0)

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

...other とのマッチを行います。

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

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

@return マッチが成功すれば MatchData オブジェクトを、そうでなければ nil を返します。

p :foo.match(/foo/) # => #<Mat...
...chData "foo">
p :foobar.match(/bar/) # => #<MatchData "bar">
p :foo.match(/bar/) # => nil

@see String#match
@see Symbol#match?...

Symbol#capitalize -> Symbol (6101.0)

シンボルに対応する文字列の先頭の文字を大文字に、残りを小文字に変更した シンボルを返します。

...に、残りを小文字に変更した
シンボルを返します。

(self.to_s.capitalize.intern と同じです。)

:foobar.capitalize #=> :Foobar
:fooBar.capitalize #=> :Foobar
:FOOBAR.capitalize #=> :Foobar
:"foobar--".capitalize # => "Foobar--"

@see String#capitalize...

Symbol#capitalize(*options) -> Symbol (6101.0)

シンボルに対応する文字列の先頭の文字を大文字に、残りを小文字に変更した シンボルを返します。

...に、残りを小文字に変更した
シンボルを返します。

(self.to_s.capitalize.intern と同じです。)

:foobar.capitalize #=> :Foobar
:fooBar.capitalize #=> :Foobar
:FOOBAR.capitalize #=> :Foobar
:"foobar--".capitalize # => "Foobar--"

@see String#capitalize...

Symbol#empty? -> bool (6101.0)

自身が :"" (length が 0 のシンボル)かどうかを返します。

...自身が :"" (length が 0 のシンボル)かどうかを返します。

:"".empty? #=> true
:foo.empty? #=> false

@see String#empty?...

Symbol#end_with?(*suffixes) -> bool (6101.0)

self の末尾が suffixes のいずれかであるとき true を返します。

...とき true を返します。

(self.to_s.end_with?と同じです。)

@param suffixes パターンを表す文字列 (のリスト)

@see Symbol#start_with?

@see String#end_with?

//emlist[][ruby]{
:hello.end_with?("ello") #=> true

# returns true if one of the +suffixes+ matches....
...:hello.end_with?("heaven", "ello") #=> true
:hello.end_with?("heaven", "paradise") #=> false
//}...

絞り込み条件を変える

Symbol#inspect -> String (6101.0)

自身を人間に読みやすい文字列にして返します。

...自身を人間に読みやすい文字列にして返します。

:fred.inspect #=> ":fred"...

Symbol#intern -> self (6101.0)

self を返します。

...self を返します。

例:

:foo.intern # => :foo

@see String#intern...

Symbol#length -> Integer (6101.0)

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

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

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

:foo.length #=> 3

@see String#length, String#size...

Symbol#match(other) -> Integer | nil (6101.0)

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

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

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

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

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

p :foo.match(/foo/) # =>...
...0
p :foobar.match(/bar/) # => 3
p :foo.match(/bar/) # => nil

@see String#match...

Symbol#match?(regexp, pos = 0) -> bool (6101.0)

regexp.match?(self, pos) と同じです。 regexp が文字列の場合は、正規表現にコンパイルします。 詳しくは Regexp#match? を参照してください。

...match?(self, pos) と同じです。
regexp が文字列の場合は、正規表現にコンパイルします。
詳しくは Regexp#match? を参照してください。

例:

:Ruby.match?(/R.../) # => true
:Ruby.match?('Ruby') # => true
:Ruby.match?('Ruby',1) # => false
:Ruby.matc...
...h?('uby',1) # => true
:Ruby.match?(/P.../) # => false
$& # => nil

@see Regexp#match?, String#match?...

絞り込み条件を変える

Symbol#next -> Symbol (6101.0)

シンボルに対応する文字列の「次の」文字列に対応するシンボルを返します。

...シンボルに対応する文字列の「次の」文字列に対応するシンボルを返します。

(self.to_s.next.intern と同じです。)

:a.next # => :b
:foo.next # => :fop

@see String#succ...

Symbol#start_with?(*prefixes) -> bool (6101.0)

self の先頭が prefixes のいずれかであるとき true を返します。

...とき true を返します。

(self.to_s.start_with?と同じです。)

@param prefixes パターンを表す文字列または正規表現 (のリスト)

@see Symbol#end_with?

@see String#start_with?

//emlist[][ruby]{
:hello.start_with?("hell") #=> true
:hello.start_with?(/H/i)...
...#=> true

# returns true if one of the prefixes matches.
:hello.start_with?("heaven", "hell") #=> true
:hello.start_with?("heaven", "paradise") #=> false
//}...
<< 1 2 3 ... > >>