84件ヒット
[1-84件を表示]
(0.126秒)
ライブラリ
- ビルトイン (36)
- fiddle (24)
- pathname (12)
-
rexml
/ document (12)
クラス
-
Fiddle
:: Pointer (24) -
REXML
:: Attribute (12) - String (36)
モジュール
- Kernel (12)
検索結果
先頭5件
-
Fiddle
:: Pointer # to _ str(len) -> String (21203.0) -
自身が指す領域から長さ len の文字列を複製して返します。
...自身が指す領域から長さ len の文字列を複製して返します。
len を省略した場合は、self.size をその代わりに使います。
@param len 文字列の長さを整数で指定します。... -
Fiddle
:: Pointer # to _ str -> String (21103.0) -
自身が指す領域から長さ len の文字列を複製して返します。
...自身が指す領域から長さ len の文字列を複製して返します。
len を省略した場合は、self.size をその代わりに使います。
@param len 文字列の長さを整数で指定します。... -
REXML
:: Attribute # to _ string -> String (9101.0) -
"name='value'" という形式の文字列を返します。
..."name='value'" という形式の文字列を返します。
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("el")
e.add_attribute("ns:r", "rval")
p e.attributes.get_attribute("r").to_string # => "ns:r='rval'"
//}... -
Kernel
# Pathname(path) -> Pathname (3007.0) -
文字列 path を元に Pathname オブジェクトを生成します。
...文字列 path を元に Pathname オブジェクトを生成します。
Pathname.new(path) と同じです。
@param path 文字列、または類似のオブジェクトを与えます。
実際には to_str に反応するオブジェクトなら何でも構いません。... -
String
# ==(other) -> bool (119.0) -
other が文字列の場合、String#eql? と同様に文字列の内容を比較します。
...の場合、String#eql? と同様に文字列の内容を比較します。
other が文字列でない場合、
other.to_str が定義されていれば
other == self の結果を返します。(ただし、 other.to_str は実行されません。)
そうでなければ false を返します。......true か false
//emlist[例][ruby]{
stringlike = Object.new
def stringlike.==(other)
"string" == other
end
p "string".eql?(stringlike) #=> false
p "string" == stringlike #=> false
def stringlike.to_str
raise
end
p "string".eql?(stringlike) #=> false
p "string" == stringlike #=> tru......e
//}
@see String#eql?... -
String
# ===(other) -> bool (119.0) -
other が文字列の場合、String#eql? と同様に文字列の内容を比較します。
...の場合、String#eql? と同様に文字列の内容を比較します。
other が文字列でない場合、
other.to_str が定義されていれば
other == self の結果を返します。(ただし、 other.to_str は実行されません。)
そうでなければ false を返します。......true か false
//emlist[例][ruby]{
stringlike = Object.new
def stringlike.==(other)
"string" == other
end
p "string".eql?(stringlike) #=> false
p "string" == stringlike #=> false
def stringlike.to_str
raise
end
p "string".eql?(stringlike) #=> false
p "string" == stringlike #=> tru......e
//}
@see String#eql?... -
String
# <=>(other) -> -1 | 0 | 1 | nil (107.0) -
self と other を ASCII コード順で比較して、 self が大きい時には 1、等しい時には 0、小さい時には -1 を返します。 このメソッドは Comparable モジュールのメソッドを実装するために使われます。
...self と other を ASCII コード順で比較して、
self が大きい時には 1、等しい時には 0、小さい時には -1 を返します。
このメソッドは Comparable モジュールのメソッドを実装するために使われます。
other が文字列でない場合、
othe......r.to_str と other.<=> が定義されていれば
0 - (other <=> self) の結果を返します。
そうでなければ nil を返します。
@param other 文字列
@return 比較結果の整数か nil
//emlist[例][ruby]{
p "aaa" <=> "xxx" # => -1
p "aaa" <=> "aaa" # => 0
p "xxx...