3714件ヒット
[1-100件を表示]
(0.099秒)
ライブラリ
- ビルトイン (1203)
- benchmark (11)
- bigdecimal (55)
-
bigdecimal
/ util (11) - csv (44)
- date (11)
- digest (22)
- erb (11)
- fiddle (110)
-
fiddle
/ import (11) - ipaddr (33)
-
irb
/ context (44) - json (11)
- matrix (22)
- openssl (363)
- optparse (44)
- ostruct (34)
- pathname (768)
- rake (77)
- resolv (33)
- rexml (11)
-
rexml
/ document (264) -
rubygems
/ package / tar _ header (11) -
rubygems
/ platform (11) -
rubygems
/ requirement (11) -
rubygems
/ version (22) - set (36)
-
shell
/ filter (12) - socket (44)
- stringio (22)
- uri (44)
-
webrick
/ httprequest (11) -
webrick
/ httpresponse (33) -
webrick
/ httputils (11) -
webrick
/ httpversion (11) -
webrick
/ log (66) - win32ole (132)
- zlib (22)
クラス
-
ARGF
. class (33) - Addrinfo (22)
- Array (77)
- BasicObject (11)
-
Benchmark
:: Tms (11) - BigDecimal (66)
- Bignum (6)
-
CGI
:: Cookie (11) -
CSV
:: Row (22) -
CSV
:: Table (22) - Complex (11)
- Data (4)
- Date (11)
-
Digest
:: Base (22) - ERB (11)
- Encoding (22)
-
Enumerator
:: Lazy (20) - Exception (22)
- FalseClass (22)
-
Fiddle
:: Pointer (110) - Fixnum (6)
- Float (42)
-
Gem
:: Package :: TarHeader (11) -
Gem
:: Platform (11) -
Gem
:: Requirement (11) -
Gem
:: Version (22) - Hash (88)
- IO (33)
- IPAddr (33)
-
IRB
:: Context (44) - Integer (22)
- MatchData (11)
- Matrix (11)
- Method (22)
- Module (33)
- NameError (11)
- NilClass (11)
- Object (70)
-
OpenSSL
:: BN (11) -
OpenSSL
:: Config (11) -
OpenSSL
:: HMAC (33) -
OpenSSL
:: Netscape :: SPKI (22) -
OpenSSL
:: PKCS7 (22) -
OpenSSL
:: PKey :: DH (33) -
OpenSSL
:: PKey :: DSA (66) -
OpenSSL
:: PKey :: RSA (66) -
OpenSSL
:: X509 :: CRL (22) -
OpenSSL
:: X509 :: Certificate (22) -
OpenSSL
:: X509 :: Extension (11) -
OpenSSL
:: X509 :: Name (11) -
OpenSSL
:: X509 :: Request (22) - OpenStruct (34)
- OptionParser (22)
-
OptionParser
:: ParseError (22) - Pathname (768)
- Proc (22)
-
Process
:: Status (11) -
REXML
:: Attribute (22) -
REXML
:: CData (22) -
REXML
:: Comment (22) -
REXML
:: Declaration (11) -
REXML
:: DocType (11) -
REXML
:: Element (44) -
REXML
:: Elements (44) -
REXML
:: Entity (22) -
REXML
:: ExternalEntity (11) -
REXML
:: NotationDecl (11) -
REXML
:: ParseException (11) -
REXML
:: Text (33) -
Rake
:: EarlyTime (11) -
Rake
:: FileList (11) -
Rake
:: InvocationChain (11) -
Rake
:: InvocationChain :: EmptyInvocationChain (11) -
Rake
:: Task (11) -
Rake
:: TaskArguments (22) - Range (22)
- Rational (22)
- Regexp (22)
-
Resolv
:: DNS :: Name (11) -
Resolv
:: IPv4 (11) -
Resolv
:: IPv6 (11) - Set (14)
-
Shell
:: Filter (12) -
Socket
:: Option (22) - String (99)
- StringIO (22)
- Struct (22)
- Symbol (278)
- Thread (36)
-
Thread
:: Backtrace :: Location (22) - Time (16)
- TrueClass (11)
-
URI
:: Generic (44) - UnboundMethod (33)
- UncaughtThrowError (10)
- Vector (11)
-
WEBrick
:: BasicLog (66) -
WEBrick
:: Cookie (11) -
WEBrick
:: HTTPRequest (11) -
WEBrick
:: HTTPResponse (33) -
WEBrick
:: HTTPUtils :: FormData (11) -
WEBrick
:: HTTPVersion (11) -
WIN32OLE
_ EVENT (11) -
WIN32OLE
_ METHOD (22) -
WIN32OLE
_ PARAM (22) -
WIN32OLE
_ TYPE (33) -
WIN32OLE
_ TYPELIB (22) -
WIN32OLE
_ VARIABLE (22) -
Zlib
:: GzipWriter (22)
モジュール
- Enumerable (22)
-
Fiddle
:: Importer (11) -
JSON
:: Generator :: GeneratorMethods :: Object (11) -
OpenSSL
:: Buffering (11) -
REXML
:: Node (11)
キーワード
- % (22)
- +@ (11)
- -@ (11)
- << (55)
- =~ (11)
- [] (77)
-
_ _ to _ s _ _ (11) - add (11)
-
add
_ element (11) -
add
_ namespace (11) -
add
_ trace _ func (11) - atime (11)
- basename (11)
- bind (11)
- binread (11)
- binwrite (11)
- birthtime (10)
- blockdev? (11)
- capitalize (11)
- chardev? (11)
- chmod (11)
- chown (11)
-
content
_ length (11) - ctime (11)
- data (11)
- debug (11)
-
define
_ singleton _ method (22) - delete (11)
-
delete
_ all (11) -
delete
_ element (11) -
delete
_ namespace (11) - directory? (11)
- dirname (11)
- downcase (11)
-
each
_ entry (13) -
each
_ line (22) - empty? (8)
-
end
_ with? (5) - entities (11)
- error (11)
- executable? (11)
-
executable
_ real? (11) - exist? (11)
- export (55)
- extname (11)
- fatal (11)
- file? (11)
- find (22)
- fnmatch (11)
- fnmatch? (11)
- ftype (11)
- grep (11)
-
grep
_ v (9) - grpowned? (11)
- handler= (11)
- help (11)
- hex (11)
- hexdigest (22)
-
http
_ version (11) - id2name (11)
- info (11)
- inspect (247)
- inspect? (11)
- intern (11)
- join (11)
- lchmod (11)
- lchown (11)
- length (11)
- lstat (11)
-
make
_ link (11) -
make
_ symlink (11) - match (11)
- merge! (11)
-
method
_ missing (11) - mkdir (11)
- mkpath (11)
- modulo (11)
- mtime (11)
- name (81)
- next (11)
-
next
_ float (10) - normalize (11)
- normalize! (11)
- oct (11)
- open (22)
- opendir (22)
- owned? (11)
- owner (11)
- pipe? (11)
-
prev
_ float (10) - print (11)
- ptr (11)
- read (11)
- readable? (11)
-
readable
_ real? (11) - readlines (11)
- readlink (11)
- ref (11)
- remainder (11)
- rename (11)
- rmdir (11)
- rmtree (11)
-
set
_ trace _ func (11) - setgid? (11)
- setuid? (11)
- size (22)
- size? (11)
- slice (55)
- socket? (11)
- split (11)
- src (11)
-
start
_ with? (5) - stat (11)
- sticky? (11)
- string (11)
- succ (22)
- swapcase (11)
- symlink? (11)
- sysopen (11)
- syswrite (11)
- then (12)
-
to
_ csv (22) -
to
_ digits (11) -
to
_ f (11) -
to
_ h (12) -
to
_ i (11) -
to
_ json (11) -
to
_ path (11) -
to
_ pem (110) -
to
_ proc (11) -
to
_ set (22) -
to
_ sockaddr (11) -
to
_ str (44) -
to
_ string (22) -
to
_ sym (22) -
transform
_ keys (17) -
transform
_ keys! (17) -
transform
_ values (16) -
transform
_ values! (16) - truncate (11)
- uniq (22)
- uniq! (22)
- upcase (11)
- utime (11)
- value (22)
- value= (11)
- version (11)
- warn (11)
-
world
_ readable? (11) -
world
_ writable? (11) - writable? (11)
-
writable
_ real? (11) - write (66)
-
yield
_ self (14) - zero? (11)
- | (6)
検索結果
先頭5件
-
OpenSSL
:: BN # to _ s(base=10) -> String (18286.0) -
自身を表す文字列を返します。
...0.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 OpenSS... -
BigDecimal
# to _ s -> String (18263.0) -
self を文字列に変換します (デフォルトは "0.xxxxxen" の形になります)。
...l("1.23456").to_s # ==> "0.123456e1"
//}
引数 n に正の整数が指定されたときは、小数点で分けられる左右部分を、
それぞれ n 桁毎に空白で区切ります。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("0.1234567890123456789").to_s(10) # => "0.123456789......9").to_s("10") # => "0.1234567890 123456789e0"
//}
文字列の最初に '+' または ' ' を付けると、値が正の場合先頭に '+' または
' ' が付きます。負の場合は常に '-' が付きます。
//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"
//}
さらに文字列の最後に指数形式 ('E' または 'e') か指数を使わない形式
('F' または 'f') かを指定出来ます。デフォルトは指数形式で... -
BigDecimal
# to _ s(n) -> String (18263.0) -
self を文字列に変換します (デフォルトは "0.xxxxxen" の形になります)。
...l("1.23456").to_s # ==> "0.123456e1"
//}
引数 n に正の整数が指定されたときは、小数点で分けられる左右部分を、
それぞれ n 桁毎に空白で区切ります。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("0.1234567890123456789").to_s(10) # => "0.123456789......9").to_s("10") # => "0.1234567890 123456789e0"
//}
文字列の最初に '+' または ' ' を付けると、値が正の場合先頭に '+' または
' ' が付きます。負の場合は常に '-' が付きます。
//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"
//}
さらに文字列の最後に指数形式 ('E' または 'e') か指数を使わない形式
('F' または 'f') かを指定出来ます。デフォルトは指数形式で... -
Complex
# to _ s -> String (18232.0) -
自身を "実部 + 虚部i" 形式の文字列にして返します。
...。
//emlist[例][ruby]{
Complex(2).to_s # => "2+0i"
Complex('-8/6').to_s # => "-4/3+0i"
Complex('1/2i').to_s # => "0+1/2i"
Complex(0, Float::INFINITY).to_s # => "0+Infinity*i"
Complex(Float::NAN, Float::NAN).to_s # => "NaN+NaN*i"
//}... -
OpenSSL
:: X509 :: Name # to _ s(flags=nil) -> String (18232.0) -
DNの文字列表現を返します。
...jp')
n.to_s
# => "/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::COMPAT)
# => "C=JP, ST=Kanagawa, L=Yokohama, O=Example Company, OU=Lab3, CN=foobar/emailAddress=foobar@lab3.example.co.jp"
n.to_s(OpenSSL:......)
# => "emailAddress=foobar@lab3.example.co.jp,CN=foobar,OU=Lab3,O=Example Company,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(OpenSS......L::X509::Name::MULTILINE)
# => "countryName = JP\nstateOrProvinceName = Kanagawa\nlocalityName = Yokohama\norganizationName = Example Company\norganizationalUnitName = Lab3\ncommonName = foobar\nemailAddress = foobar@lab3.exa... -
Range
# to _ s -> String (18230.0) -
self を文字列に変換します(始端と終端のオブジェクトは #to_s メソッドで文 字列に変換されます)。
...self を文字列に変換します(始端と終端のオブジェクトは #to_s メソッドで文
字列に変換されます)。
@see Range#inspect
//emlist[例][ruby]{
(1..5).to_s # => "1..5"
("1".."5").to_s # => "1..5"
//}... -
Rational
# to _ s -> String (18226.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... -
String
# to _ s -> String (18226.0) -
self を返します。
...uby]{
p "str".to_s # => "str"
p "str".to_str # => "str"
//}
このメソッドは、文字列を他のクラスのインスタンスと混ぜて処理したいときに有効です。
例えば返り値が文字列か nil であるメソッド some_method があるとき、
to_s メソッド......を使うと以下のように統一的に処理できます。
//emlist[例][ruby]{
# some_method(5).downcase だと返り値が nil のときに
# エラーになるので to_s をはさむ
p some_method(5).to_s.downcase
//}... -
Process
:: Status # to _ s -> String (18218.0) -
to_i.to_s と同じです。
...to_i.to_s と同じです。... -
MatchData
# to _ s -> String (18214.0) -
マッチした文字列全体を返します。
...マッチした文字列全体を返します。
//emlist[例][ruby]{
/bar/ =~ "foobarbaz"
p $~ # => #<MatchData:0x401b1be4>
p $~.to_s # => "bar"
//}...