293件ヒット
[1-100件を表示]
(0.103秒)
ライブラリ
- ビルトイン (281)
-
json
/ add / symbol (12)
検索結果
先頭5件
-
Symbol
# intern -> self (6107.0) -
self を返します。
...self を返します。
例:
:foo.intern # => :foo
@see String#intern... -
Symbol
# start _ with?(*prefixes) -> bool (6107.0) -
self の先頭が prefixes のいずれかであるとき true を返します。
...f の先頭が prefixes のいずれかであるとき 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
//}... -
Symbol
# to _ sym -> self (3007.0) -
self を返します。
...self を返します。
例:
:foo.intern # => :foo
@see String#intern... -
Symbol
# [](range) -> String | nil (223.0) -
rangeで指定したインデックスの範囲に含まれる部分文字列を返します。
...
rangeで指定したインデックスの範囲に含まれる部分文字列を返します。
(self.to_s[range] と同じです。)
@param range 取得したい文字列の範囲を示す Range オブジェクトを指定します。
:foo[0..1] # => "fo"
@see String#[] , String#slice... -
Symbol
# slice(range) -> String | nil (223.0) -
rangeで指定したインデックスの範囲に含まれる部分文字列を返します。
...
rangeで指定したインデックスの範囲に含まれる部分文字列を返します。
(self.to_s[range] と同じです。)
@param range 取得したい文字列の範囲を示す Range オブジェクトを指定します。
:foo[0..1] # => "fo"
@see String#[] , String#slice... -
Symbol
# id2name -> String (215.0) -
シンボルに対応する文字列を返します。
...シンボルに対応する文字列を返します。
逆に、文字列に対応するシンボルを得るには
String#intern を使います。
p :foo.id2name # => "foo"
p :foo.id2name.intern == :foo # => true
@see String#intern......シンボルに対応する文字列を返します。
逆に、文字列に対応するシンボルを得るには
String#intern を使います。
p :foo.id2name # => "foo"
p :foo.id2name.intern == :foo # => true
@see String#intern
@see Symbol#name... -
Symbol
# to _ s -> String (215.0) -
シンボルに対応する文字列を返します。
...シンボルに対応する文字列を返します。
逆に、文字列に対応するシンボルを得るには
String#intern を使います。
p :foo.id2name # => "foo"
p :foo.id2name.intern == :foo # => true
@see String#intern......シンボルに対応する文字列を返します。
逆に、文字列に対応するシンボルを得るには
String#intern を使います。
p :foo.id2name # => "foo"
p :foo.id2name.intern == :foo # => true
@see String#intern
@see Symbol#name... -
Symbol
# [](nth) -> String | nil (213.0) -
nth 番目の文字を返します。
...nth 番目の文字を返します。
(self.to_s[nth] と同じです。)
@param nth 文字の位置を表す整数を指定します。
:foo[0] # => "f"
:foo[1] # => "o"
:foo[2] # => "o"... -
Symbol
# [](nth , len) -> String | nil (213.0) -
nth 番目から長さ len の部分文字列を新しく作って返します。
...nth 番目から長さ len の部分文字列を新しく作って返します。
(self.to_s[nth, len] と同じです。)
@param nth 文字の位置を表す整数を指定します。
@param len 文字列の長さを指定します。
:foo[1, 2] # => "oo"...