2781件ヒット
[1-100件を表示]
(0.210秒)
ライブラリ
- ビルトイン (898)
- bigdecimal (24)
-
bigdecimal
/ util (12) - digest (24)
- erb (12)
- fiddle (144)
-
fiddle
/ import (12) - ipaddr (24)
-
irb
/ context (24) - json (12)
- openssl (108)
- optparse (24)
- ostruct (24)
- pathname (827)
-
racc
/ parser (12) - rake (24)
-
rexml
/ document (240) - scanf (12)
- set (18)
-
shell
/ filter (6) - stringio (24)
- uri (12)
-
webrick
/ httpresponse (60) -
webrick
/ log (12) -
win32
/ registry (24) - win32ole (144)
- zlib (24)
クラス
-
ARGF
. class (12) - Array (14)
- BasicObject (12)
- BigDecimal (36)
- Bignum (6)
-
Digest
:: Base (24) - ERB (12)
-
Enumerator
:: Lazy (22) -
Fiddle
:: Pointer (144) - Fixnum (6)
- Float (46)
- Hash (76)
- IO (36)
- IPAddr (24)
-
IRB
:: Context (24) - Integer (24)
- Method (24)
- Module (36)
- Object (78)
-
OpenSSL
:: BN (12) -
OpenSSL
:: Netscape :: SPKI (24) -
OpenSSL
:: X509 :: CRL (24) -
OpenSSL
:: X509 :: Name (12) -
OpenSSL
:: X509 :: Request (24) - OpenStruct (24)
-
OptionParser
:: ParseError (24) - Pathname (827)
-
REXML
:: CData (24) -
REXML
:: Child (24) -
REXML
:: Element (72) -
REXML
:: Elements (60) -
REXML
:: Entity (24) -
REXML
:: Text (24) -
Racc
:: Parser (12) -
Rake
:: TaskArguments (24) - Range (24)
- Rational (24)
- Regexp (24)
-
Scanf
:: FormatSpecifier (6) -
Scanf
:: FormatString (6) -
Shell
:: Filter (6) - String (60)
- StringIO (24)
- Symbol (296)
- Thread (24)
-
Thread
:: Backtrace :: Location (24) -
URI
:: Generic (12) - UnboundMethod (24)
-
WEBrick
:: BasicLog (12) -
WEBrick
:: HTTPResponse (60) -
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ METHOD (24) -
WIN32OLE
_ PARAM (24) -
WIN32OLE
_ TYPE (36) -
WIN32OLE
_ TYPELIB (24) -
WIN32OLE
_ VARIABLE (24) -
Win32
:: Registry (24) -
Zlib
:: GzipWriter (24)
モジュール
- Enumerable (24)
-
Fiddle
:: Importer (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12) -
OpenSSL
:: Buffering (12) -
REXML
:: Node (12)
キーワード
- % (12)
- +@ (12)
- -@ (12)
- << (48)
- =~ (12)
- [] (84)
- []= (48)
- add (12)
-
add
_ element (12) -
add
_ namespace (24) -
add
_ trace _ func (12) - atime (12)
- basename (12)
- bind (12)
- binread (12)
- binwrite (12)
- birthtime (11)
- blockdev? (12)
- body= (12)
- capitalize (12)
- chardev? (12)
- chmod (12)
- chown (12)
- chunked= (12)
-
content
_ length (12) -
content
_ length= (12) - ctime (12)
-
define
_ singleton _ method (24) - delete (12)
-
delete
_ all (12) -
delete
_ element (12) -
delete
_ namespace (12) - directory? (12)
- dirname (12)
- downcase (9)
-
each
_ entry (15) -
each
_ line (24) - empty? (9)
-
end
_ with? (6) - executable? (12)
-
executable
_ real? (12) - exist? (12)
- extname (12)
- fatal (12)
-
fetch
_ values (2) - file? (12)
- find (24)
- fnmatch (12)
- fnmatch? (12)
- ftype (12)
- grep (12)
-
grep
_ v (10) - grpowned? (12)
- handler= (12)
- hex (12)
- hexdigest (12)
- hostname= (12)
- id2name (12)
- inspect (150)
- inspect? (12)
-
inspect
_ mode= (12) - join (12)
- lchmod (12)
- lchown (12)
- length (12)
- lstat (12)
-
make
_ link (12) -
make
_ symlink (12) - match (12)
-
method
_ missing (12) - mkdir (12)
- mkpath (12)
- mtime (12)
- name (89)
- next (12)
-
next
_ float (11) -
next
_ sibling= (12) - oct (12)
- open (24)
- opendir (24)
- owned? (12)
- pipe? (12)
-
prev
_ float (11) -
previous
_ sibling= (12) - print (12)
- ptr (12)
- read (12)
- readable? (12)
-
readable
_ real? (12) - readlines (12)
- readlink (12)
- ref (12)
- rename (12)
- rmdir (12)
- rmtree (12)
-
set
_ trace _ func (12) - setgid? (12)
- setuid? (12)
- size (24)
- size? (12)
- slice (60)
- socket? (12)
- split (12)
- src (12)
-
start
_ with? (6) - stat (12)
- sticky? (12)
- succ (12)
- swapcase (9)
- symlink? (12)
- sysopen (12)
- syswrite (12)
- text= (12)
- then (14)
-
to
_ digits (12) -
to
_ f (12) -
to
_ i (12) -
to
_ json (12) -
to
_ path (12) -
to
_ pem (36) -
to
_ proc (12) -
to
_ set (24) -
to
_ str (36) -
to
_ string (12) -
to
_ sym (12) -
token
_ to _ str (12) -
transform
_ keys (20) -
transform
_ keys! (20) -
transform
_ values (18) -
transform
_ values! (18) - truncate (12)
- upcase (9)
- utime (12)
- value (24)
-
world
_ readable? (12) -
world
_ writable? (12) - writable? (12)
-
writable
_ real? (12) - write (72)
-
yield
_ self (16) - zero? (12)
- | (6)
検索結果
先頭5件
-
OpenSSL
:: BN # to _ s(base=10) -> String (24304.0) -
自身を表す文字列を返します。
...)
@param base 文字列への変換方法(基数)
@raise OpenSSL::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) # => "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::BN.new を用います。
@see OpenSSL::BN.new... -
BigDecimal
# to _ s -> String (24269.0) -
self を文字列に変換します (デフォルトは "0.xxxxxen" の形になります)。
...列に変換します (デフォルトは "0.xxxxxen" の形になります)。
@param n 出力の形式を Integer または String で指定します。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("1.23456").to_s # ==> "0.123456e1"
//}
引数 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") # => "......きます。負の場合は常に '-' が付きます。
//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 (24269.0) -
self を文字列に変換します (デフォルトは "0.xxxxxen" の形になります)。
...列に変換します (デフォルトは "0.xxxxxen" の形になります)。
@param n 出力の形式を Integer または String で指定します。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("1.23456").to_s # ==> "0.123456e1"
//}
引数 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") # => "......きます。負の場合は常に '-' が付きます。
//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
:: X509 :: Name # to _ s(flags=nil) -> String (24268.0) -
DNの文字列表現を返します。
...PAT
* OpenSSL::X509::Name::RFC2253
* OpenSSL::X509::Name::ONELINE
* OpenSSL::X509::Name::MULTILINE
*
例:
require 'openssl'
n = OpenSSL::X509::Name.parse('/C=JP/ST=Kanagawa/L=Yokohama/O=Example Company/OU=Lab3/CN=foobar/emailAddress=foobar@lab3.example.co.jp')
n.to_s
# => "/C=JP/ST=......CN=foobar/emailAddress=foobar@lab3.example.co.jp"
n.to_s(OpenSSL::X509::Name::COMPAT)
# => "C=JP, ST=Kanagawa, L=Yokohama, O=Example Company, OU=Lab3, CN=foobar/emailAddress=foobar@lab3.example.co.jp"
n.to_s(OpenSSL::X509::Name::RFC2253)
# => "emailAddress=foobar@lab3.example.co.jp,CN=foobar......y,L=Yokohama,ST=Kanagawa,C=JP"
n.to_s(OpenSSL::X509::Name::ONELINE)
# => "C = JP, ST = Kanagawa, L = Yokohama, O = Example Company, OU = Lab3, CN = foobar, emailAddress = foobar@lab3.example.co.jp"
n.to_s(OpenSSL::X509::Name::MULTILINE)
# => "countryName = JP\nstateOrProvinceNa... -
Rational
# to _ s -> String (24238.0) -
自身を人間が読みやすい形の文字列表現にして返します。
..."-17/7" のように10進数の表記を返します。
@return 有理数の表記にした文字列を返します。
//emlist[例][ruby]{
Rational(3, 4).to_s # => "3/4"
Rational(8).to_s # => "8/1"
Rational(-8, 6).to_s # => "-4/3"
Rational(0.5).to_s # => "1/2"
//}
@see Rational#inspect... -
Range
# to _ s -> String (24236.0) -
self を文字列に変換します(始端と終端のオブジェクトは #to_s メソッドで文 字列に変換されます)。
...self を文字列に変換します(始端と終端のオブジェクトは #to_s メソッドで文
字列に変換されます)。
@see Range#inspect
//emlist[例][ruby]{
(1..5).to_s # => "1..5"
("1".."5").to_s # => "1..5"
//}... -
REXML
:: Text # to _ s -> String (24232.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"
//}... -
Object
# to _ s -> String (24220.0) -
オブジェクトの文字列表現を返します。
...int や Kernel.#sprintf は文字列以外の
オブジェクトが引数に渡された場合このメソッドを使って文字列に変換し
ます。
//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... -
Regexp
# to _ s -> String (24220.0) -
正規表現の文字列表現を生成して返します。返される文字列は他の正規表 現に埋め込んでもその意味が保持されるようになっています。
...される文字列は他の正規表
現に埋め込んでもその意味が保持されるようになっています。
//emlist[][ruby]{
re = /foo|bar|baz/i
p re.to_s # => "(?i-mx:foo|bar|baz)"
p /#{re}+/o # => /(?i-mx:foo|bar|baz)+/
//}
ただし、後方参照を含む正規表現......emlist[][ruby]{
re = /(foo|bar)\1/ # \1 は、foo か bar
p /(baz)#{re}/ # \1 は、baz
# => /(baz)(?-mix:(foo|bar)\1)/
//}
//emlist[使用例][ruby]{
re = /foo|bar|baz/i
p re.to_s # => "(?i-mx:foo|bar|baz)"
p /#{re}+/o # => /(?i-mx:foo|bar|baz)+/
//}
@see Regexp#inspect...