975件ヒット
[1-100件を表示]
(0.065秒)
ライブラリ
- ビルトイン (591)
- benchmark (12)
- bigdecimal (24)
-
bigdecimal
/ util (12) - csv (24)
- digest (24)
- erb (12)
-
irb
/ context (36) - json (12)
- openssl (12)
- pathname (24)
- rake (12)
-
rexml
/ document (24) - stringio (24)
-
webrick
/ httprequest (12) -
webrick
/ httpresponse (36) -
webrick
/ httputils (12) -
webrick
/ httpversion (12) - win32ole (48)
クラス
-
Benchmark
:: Tms (12) - BigDecimal (36)
- Bignum (6)
-
CSV
:: Table (24) -
Digest
:: Base (24) - ERB (12)
- Fixnum (6)
-
IRB
:: Context (36) - Integer (24)
- MatchData (12)
- Method (12)
- Module (36)
- Object (78)
-
OpenSSL
:: BN (12) - Pathname (24)
-
REXML
:: Attribute (24) -
Rake
:: FileList (12) - String (60)
- StringIO (24)
- Symbol (293)
- Thread (16)
-
Thread
:: Backtrace :: Location (24) - UnboundMethod (24)
-
WEBrick
:: Cookie (12) -
WEBrick
:: HTTPRequest (12) -
WEBrick
:: HTTPResponse (36) -
WEBrick
:: HTTPUtils :: FormData (12) -
WEBrick
:: HTTPVersion (12) -
WIN32OLE
_ TYPELIB (24) -
WIN32OLE
_ VARIABLE (24)
モジュール
キーワード
- % (12)
- << (12)
- =~ (12)
- [] (60)
-
_ _ to _ s _ _ (12) - binread (12)
- binwrite (12)
- capitalize (12)
-
content
_ length (12) -
content
_ length= (12) -
define
_ singleton _ method (24) - downcase (12)
-
end
_ with? (6) - hexdigest (12)
- id2name (12)
- inspect (80)
- intern (12)
- length (12)
- match (12)
- name (41)
- next (12)
- oct (12)
- size (12)
- slice (60)
- src (12)
-
start
_ with? (6) - succ (12)
- swapcase (12)
- then (14)
-
to
_ csv (12) -
to
_ digits (12) -
to
_ i (12) -
to
_ json (12) -
to
_ str (12) -
to
_ string (12) -
to
_ sym (24) - upcase (12)
- write (12)
-
yield
_ self (16)
検索結果
先頭5件
-
OpenSSL
:: BN # to _ s(base=10) -> String (21387.0) -
自身を表す文字列を返します。
...ます。
base で、変換方法(基数)を指定します。
デフォルトは 10 で、他に 16, 2, 0 を指定できます。
10 10進数の表記
16 16進数の表記
2 big-endianの符号無し整数のバイナリ列
0 MPI形式の文字列(バイト列)
@param base 文字......SSL::BNError 変換に失敗した場合に発生します
//emlist[][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)......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 ク... -
BigDecimal
# to _ s -> String (21271.0) -
self を文字列に変換します (デフォルトは "0.xxxxxen" の形になります)。
...は String で指定します。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("1.23456").to_s # ==> "0.123456e1"
//}
引数 n に正の整数が指定されたときは、小数点で分けられる左右部分を、
それぞれ n 桁毎に空白で区切ります。
//emlist[][ruby]{
req......uire "bigdecimal"
BigDecimal("0.1234567890123456789").to_s(10) # => "0.1234567890 123456789e0"
//}
引数 n に正の整数を表す文字列を指定することもできます。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("0.1234567890123456789").to_s("10") # => "0.1234567890 123456789e......ます。負の場合は常に '-' が付きます。
//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 (21271.0) -
self を文字列に変換します (デフォルトは "0.xxxxxen" の形になります)。
...は String で指定します。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("1.23456").to_s # ==> "0.123456e1"
//}
引数 n に正の整数が指定されたときは、小数点で分けられる左右部分を、
それぞれ n 桁毎に空白で区切ります。
//emlist[][ruby]{
req......uire "bigdecimal"
BigDecimal("0.1234567890123456789").to_s(10) # => "0.1234567890 123456789e0"
//}
引数 n に正の整数を表す文字列を指定することもできます。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("0.1234567890123456789").to_s("10") # => "0.1234567890 123456789e......ます。負の場合は常に '-' が付きます。
//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"
//}
さらに文字列の最後に指数形... -
Object
# to _ s -> String (21221.0) -
オブジェクトの文字列表現を返します。
...使って文字列に変換し
ます。
//emlist[][ruby]{
class Foo
def initialize num
@num = num
end
end
it = Foo.new(40)
puts it #=> #<Foo:0x2b69110>
class Foo
def to_s
"Class:Foo Number:#{@num}"
end
end
puts it #=> Class:Foo Number:40
//}
@see Object#to_str,Kernel.#String... -
Thread
:: Backtrace :: Location # to _ s -> String (21209.0) -
self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し ます。
...//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.to_s
end
# => path/to/foo.rb:5:in `initialize'
# path/to/foo.rb:9:in `new'
# path/to/foo.rb:9:in `<main>'
/... -
WEBrick
:: HTTPResponse # to _ s -> String (21209.0) -
実際にクライアントに送られるデータを文字列として返します。
...クライアントに送られるデータを文字列として返します。
require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
res.body = 'hoge'
print res.to_s
#=> 出力結果
HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 08:... -
WEBrick
:: HTTPVersion # to _ s -> String (21209.0) -
自身を文字列に変換して返します。
...自身を文字列に変換して返します。
require 'webrick'
v = WEBrick::HTTPVersion.new('1.1')
p v.to_s #=> "1.1"... -
Benchmark
:: Tms # to _ s -> String (21203.0) -
引数を省略して Benchmark::Tms#format を呼び出すのと同じです。
...引数を省略して Benchmark::Tms#format を呼び出すのと同じです。... -
REXML
:: Attribute # to _ s -> String (21203.0) -
正規化された属性値を返します。
正規化された属性値を返します。
属性値の正規化については XML の仕様を参考にしてください。