410件ヒット
[1-100件を表示]
(0.091秒)
種類
- インスタンスメソッド (398)
- 特異メソッド (12)
ライブラリ
- ビルトイン (386)
-
json
/ add / symbol (24)
キーワード
- <=> (12)
- == (12)
- =~ (12)
- [] (60)
- capitalize (12)
- casecmp (12)
- casecmp? (9)
- downcase (9)
- empty? (12)
-
end
_ with? (6) - id2name (12)
- inspect (12)
- intern (12)
-
json
_ create (12) - length (12)
- match (12)
- match? (9)
- name (5)
- next (12)
- size (12)
- slice (60)
-
start
_ with? (6) - succ (12)
- swapcase (9)
-
to
_ json (12) -
to
_ proc (12) -
to
_ s (12) -
to
_ sym (12) - upcase (9)
検索結果
先頭5件
-
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
//}...