684件ヒット
[1-100件を表示]
(0.136秒)
別のキーワード
ライブラリ
- ビルトイン (30)
- bigdecimal (24)
- csv (48)
- digest (24)
- erb (12)
-
fiddle
/ import (12) - json (12)
- matrix (24)
- openssl (12)
- optparse (24)
- ostruct (14)
- pathname (168)
-
rexml
/ document (228) -
rubygems
/ requirement (12) - set (28)
- stringio (12)
クラス
- BigDecimal (24)
-
CSV
:: Row (24) -
CSV
:: Table (24) -
Digest
:: Base (24) - ERB (12)
-
Gem
:: Requirement (12) - Matrix (12)
- Object (30)
-
OpenSSL
:: BN (12) - OpenStruct (14)
- OptionParser (24)
- Pathname (168)
-
REXML
:: Attribute (12) -
REXML
:: CData (24) -
REXML
:: Child (24) -
REXML
:: Element (72) -
REXML
:: Elements (60) -
REXML
:: Text (36) - Set (10)
- StringIO (12)
- Vector (12)
モジュール
- Enumerable (18)
-
Fiddle
:: Importer (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12)
キーワード
- << (12)
- []= (12)
- add (12)
-
add
_ element (12) -
add
_ namespace (24) - atime (12)
- basename (12)
- bind (12)
- binread (12)
- chown (12)
- ctime (12)
- delete (12)
-
delete
_ all (12) -
delete
_ element (12) -
delete
_ namespace (12) - dirname (12)
-
each
_ entry (15) -
each
_ line (24) - empty? (9)
- fnmatch (12)
- help (12)
- hexdigest (12)
- inspect (5)
-
next
_ sibling= (12) -
previous
_ sibling= (12) - split (12)
- src (12)
- text= (12)
- then (14)
-
to
_ csv (24) -
to
_ h (14) -
to
_ json (12) -
to
_ set (18) -
to
_ string (12) - value (24)
- value= (12)
- write (12)
-
yield
_ self (16)
検索結果
先頭5件
-
Vector
# to _ s -> String (27220.0) -
ベクトル(Vector)から文字列 (String) に変換します。
...ベクトル(Vector)から文字列 (String) に変換します。
//emlist[例][ruby]{
require 'matrix'
v = Vector[2, 3, 5, 7, 9]
p v.to_s
# => "Vector[2, 3, 5, 7, 9]"
//}... -
Gem
:: Requirement # to _ s -> String (27214.0) -
条件を表す文字列を返します。
...条件を表す文字列を返します。
//emlist[][ruby]{
req = Gem::Requirement.new(["< 5.0", ">= 1.9"])
p req.to_s # => "< 5.0, >= 1.9"
//}... -
BigDecimal
# to _ s -> String (24323.0) -
self を文字列に変換します (デフォルトは "0.xxxxxen" の形になります)。
...nteger または String で指定します。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("1.23456").to_s # ==> "0.123456e1"
//}
引数 n に正の整数が指定されたときは、小数点で分けられる左右部分を、
それぞれ n 桁毎に空白で区切ります。
//emlist......[][ruby]{
require "bigdecimal"
BigDecimal("0.1234567890123456789").to_s(10) # => "0.1234567890 123456789e0"
//}
引数 n に正の整数を表す文字列を指定することもできます。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("0.1234567890123456789").to_s("10") # => "0.12345678......きます。負の場合は常に '-' が付きます。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("0.123456").to_s(" 3") # => " 0.123 456e0"
BigDecimal("0.123456").to_s("+3") # => "+0.123 456e0"
BigDecimal("-0.123456").to_s("3") # => "-0.123 456e0"
//}
さらに文字列の最後に指数... -
BigDecimal
# to _ s(n) -> String (24323.0) -
self を文字列に変換します (デフォルトは "0.xxxxxen" の形になります)。
...nteger または String で指定します。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("1.23456").to_s # ==> "0.123456e1"
//}
引数 n に正の整数が指定されたときは、小数点で分けられる左右部分を、
それぞれ n 桁毎に空白で区切ります。
//emlist......[][ruby]{
require "bigdecimal"
BigDecimal("0.1234567890123456789").to_s(10) # => "0.1234567890 123456789e0"
//}
引数 n に正の整数を表す文字列を指定することもできます。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("0.1234567890123456789").to_s("10") # => "0.12345678......きます。負の場合は常に '-' が付きます。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("0.123456").to_s(" 3") # => " 0.123 456e0"
BigDecimal("0.123456").to_s("+3") # => "+0.123 456e0"
BigDecimal("-0.123456").to_s("3") # => "-0.123 456e0"
//}
さらに文字列の最後に指数... -
OpenSSL
:: BN # to _ s(base=10) -> String (24298.0) -
自身を表す文字列を返します。
...mlist[][ruby]{
require 'openssl'
p 10.to_bn.to_s # => "10"
p (-5).to_bn.to_s # => "-5"
p 0.to_bn.to_s(16) # => "0"
p 9.to_bn.to_s(16) # => "09"
p 10.to_bn.to_s(16) # => "0A"
p 16.to_bn.to_s(16) # => "10"
p 26.to_bn.to_s(16) # => "1A"
p 256.to_bn.to_s(16) # => "0100"
p 0.to_bn.to_s(2)......# => ""
p 6.to_bn.to_s(2) # => "\x06"
p 7.to_bn.to_s(2) # => "\a"
p 0.to_bn.to_s(0) # => "\x00\x00\x00\x00"
p 6.to_bn.to_s(0) # => "\x00\x00\x00\x01\x06"
p 7.to_bn.to_s(0) # => "\x00\x00\x00\x01\a"
//}
反対に、文字列から OpenSSL::BN クラスのインスタンスを作るには
OpenSSL::B... -
REXML
:: Text # to _ s -> String (24238.0) -
テキストの内容を正規化(すべての実体をエスケープ)された状態で返します。
...トとして妥当です。
結果は REXML::Text.new で指定した entity_filter を反映しています。
@see REXML::Text#value
//emlist[][ruby]{
require 'rexml/document'
t = REXML::Text.new("< & foobar", false, nil, false)
t.to_s # => "< & foobar"
t.value # => "< & foobar"
//}... -
Matrix
# to _ s -> String (24220.0) -
行列を文字列化し、その文字列を返します。
...行列を文字列化し、その文字列を返します。
//emlist[例][ruby]{
require 'matrix'
a1 = [1, 2]
a2 = [3, 4.5]
m = Matrix[a1, a2]
p m.to_s # => "Matrix[[1, 2], [3, 4.5]]"
//}... -
REXML
:: CData # to _ s -> String (24220.0) -
テキスト文字列を返します。
...テキスト文字列を返します。
@see REXML::Text#value, REXML::Text#to_s
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root><![CDATA[foobar baz]]></root>
EOS
doc.root[0].class # => REXML::CData
doc.root[0].value # => "foobar baz"
//}... -
Pathname
# to _ s -> String (24214.0) -
パス名を文字列で返します。
...パス名を文字列で返します。
//emlist[例][ruby]{
require 'pathname'
path = Pathname.new("/tmp/hogehoge")
File.open(path)
//}...