るりまサーチ

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

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. fileutils rm_r
  5. fileutils cp_r

ライブラリ

キーワード

検索結果

<< 1 2 3 > >>

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で指定したインデックスの範囲に含まれる部分文字列を返します。

...
r
angeで指定したインデックスの範囲に含まれる部分文字列を返します。

(self.to_s[range] と同じです。)

@param range 取得したい文字列の範囲を示す Range オブジェクトを指定します。

:foo[0..1] # => "fo"

@see String#[] , String#slice...

Symbol#slice(range) -> String | nil (223.0)

rangeで指定したインデックスの範囲に含まれる部分文字列を返します。

...
r
angeで指定したインデックスの範囲に含まれる部分文字列を返します。

(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"...
<< 1 2 3 > >>