ライブラリ
- ビルトイン (1438)
- bigdecimal (36)
-
bigdecimal
/ util (24) -
cgi
/ html (48) - csv (24)
- dbm (12)
- digest (24)
- erb (24)
- fiddle (72)
- gdbm (12)
- ipaddr (24)
-
irb
/ cmd / help (12) -
irb
/ ext / save-history (12) - json (120)
-
json
/ add / bigdecimal (12) -
json
/ add / complex (12) -
json
/ add / date (12) -
json
/ add / date _ time (12) -
json
/ add / exception (12) -
json
/ add / ostruct (12) -
json
/ add / range (12) -
json
/ add / rational (12) -
json
/ add / regexp (12) -
json
/ add / struct (12) -
json
/ add / symbol (12) -
json
/ add / time (12) - kconv (96)
-
net
/ http (24) -
net
/ pop (12) -
net
/ smtp (36) - openssl (372)
- optparse (144)
- ostruct (24)
- pathname (96)
- psych (60)
- rake (24)
-
rdoc
/ markup (36) -
rexml
/ document (84) - scanf (6)
- sdbm (12)
- shell (12)
-
shell
/ command-processor (6) -
shell
/ filter (6) - socket (36)
- stringio (112)
- uri (48)
-
webrick
/ httpresponse (24) - win32ole (144)
クラス
- Array (69)
- BigDecimal (60)
- Bignum (6)
- CSV (12)
- Complex (12)
- DBM (12)
- Date (12)
- DateTime (12)
-
Digest
:: Base (24) - ERB (24)
-
Encoding
:: Converter (36) - Enumerator (24)
- Exception (32)
-
Fiddle
:: Pointer (72) - File (16)
- Fixnum (6)
- Float (24)
- GDBM (12)
- IO (12)
- IPAddr (24)
-
IRB
:: Context (12) -
IRB
:: ExtendCommand :: Help (12) - Integer (24)
- MatchData (86)
- Method (24)
- Module (60)
-
Net
:: HTTPResponse (24) -
Net
:: POPMail (12) -
Net
:: SMTP (36) - Object (162)
-
OpenSSL
:: ASN1 :: ASN1Data (12) -
OpenSSL
:: BN (12) -
OpenSSL
:: Netscape :: SPKI (24) -
OpenSSL
:: PKCS12 (12) -
OpenSSL
:: PKCS7 (12) -
OpenSSL
:: PKey :: EC (36) -
OpenSSL
:: PKey :: EC :: Group (36) -
OpenSSL
:: SSL :: Session (36) -
OpenSSL
:: X509 :: Attribute (12) -
OpenSSL
:: X509 :: CRL (48) -
OpenSSL
:: X509 :: Extension (12) -
OpenSSL
:: X509 :: ExtensionFactory (36) -
OpenSSL
:: X509 :: Name (24) -
OpenSSL
:: X509 :: Request (48) -
OpenSSL
:: X509 :: StoreContext (12) - OpenStruct (36)
- OptionParser (120)
-
OptionParser
:: ParseError (24) - Pathname (96)
- Proc (12)
-
Psych
:: Nodes :: Node (24) -
Psych
:: ScalarScanner (12) -
RDoc
:: Markup (36) -
REXML
:: CData (24) -
REXML
:: Element (12) -
REXML
:: Entity (12) -
REXML
:: Text (24) -
Rake
:: TaskArguments (24) - Range (69)
- Rational (36)
- Regexp (36)
-
RubyVM
:: InstructionSequence (10) - SDBM (12)
-
Scanf
:: FormatString (6) - Shell (12)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) - String (476)
- StringIO (112)
- Struct (12)
- Symbol (338)
- Thread (12)
-
Thread
:: Backtrace :: Location (36) - Time (12)
- TracePoint (12)
- UDPSocket (36)
-
URI
:: MailTo (48) - UnboundMethod (24)
-
WEBrick
:: HTTPResponse (24) -
WIN32OLE
_ METHOD (36) -
WIN32OLE
_ PARAM (24) -
WIN32OLE
_ TYPE (36) -
WIN32OLE
_ TYPELIB (24) -
WIN32OLE
_ VARIABLE (24)
モジュール
-
CGI
:: HtmlExtension (48) -
JSON
:: Generator :: GeneratorMethods :: Array (12) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (12) -
JSON
:: Generator :: GeneratorMethods :: Float (12) -
JSON
:: Generator :: GeneratorMethods :: Hash (12) -
JSON
:: Generator :: GeneratorMethods :: Integer (12) -
JSON
:: Generator :: GeneratorMethods :: NilClass (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: String (24) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) -
REXML
:: Node (12)
キーワード
- % (26)
- * (24)
- << (12)
- <=> (12)
- == (12)
- === (12)
- =~ (12)
- [] (132)
- []= (12)
-
absolute
_ path (12) -
add
_ element (12) -
add
_ html (12) -
add
_ special (12) -
add
_ word _ pair (12) - autoload (12)
- autoload? (12)
- binread (12)
- binwrite (12)
- bytes (31)
- capitalize (12)
- captures (12)
- casecmp (12)
- casecmp? (9)
- chars (31)
- clone (12)
- codepoints (31)
-
col
_ sep (12) -
content
_ length (12) -
content
_ length= (12) -
create
_ ext _ from _ string (12) -
create
_ extension (24) - deconstruct (2)
-
define
_ singleton _ method (24) - downcase (12)
- dup (12)
- each (12)
-
each
_ byte (24) -
each
_ char (24) -
each
_ codepoint (36) -
each
_ grapheme _ cluster (16) -
each
_ line (36) - echo (18)
-
end
_ with? (6) - error= (12)
- execute (12)
- extname (12)
- ftype (12)
-
grapheme
_ clusters (16) - gsub (12)
- gsub! (12)
- headers (12)
- helpstring (12)
- hex (12)
- hexdigest (12)
-
history
_ file (12) - id2name (12)
-
insert
_ output (12) - inspect (150)
- intern (12)
- join (12)
- kconv (12)
- length (12)
- lines (31)
- match (12)
- name (77)
- next (12)
- oct (12)
- order (36)
- order! (18)
- pack (21)
- parse (18)
- parse! (9)
- path (20)
- permute (18)
- permute! (9)
-
program
_ name (12) -
psych
_ to _ yaml (12) -
public
_ method (12) - putback (24)
- read (12)
-
read
_ body (24) - readlines (12)
-
record
_ separator (6) - result (12)
- send (36)
-
send
_ mail (12) - sendmail (12)
-
set
_ backtrace (12) -
singleton
_ class (12) -
singleton
_ method (12) - size (12)
- slice (60)
-
source
_ location (12) - split (12)
- src (12)
-
start
_ with? (6) - step (19)
- store (36)
- succ (12)
- swapcase (12)
- syswrite (12)
- then (14)
-
to
_ a (24) -
to
_ binary (10) -
to
_ c (12) -
to
_ csv (12) -
to
_ d (12) -
to
_ der (108) -
to
_ digits (12) -
to
_ f (12) -
to
_ i (12) -
to
_ json (252) -
to
_ json _ raw (12) -
to
_ mailtext (12) -
to
_ path (20) -
to
_ pem (72) -
to
_ r (12) -
to
_ rfc822text (12) -
to
_ s (420) -
to
_ str (36) -
to
_ string (12) -
to
_ sym (12) -
to
_ text (60) -
to
_ yaml (24) - toeuc (12)
- tojis (12)
- tokenize (12)
- tolocale (12)
- top (12)
- tosjis (12)
- toutf16 (12)
- toutf32 (12)
- toutf8 (12)
- unpack (12)
- upcase (12)
- upto (12)
- value (24)
-
values
_ at (12) - verify (12)
-
with
_ object (24) - write (24)
- yaml (12)
-
yield
_ self (16)
検索結果
先頭5件
-
String
# tolocale -> String (36321.0) -
self のエンコーディングをロケールエンコーディングに変換した文字列を 返します。変換元のエンコーディングは文字列の内容から推測します。
...は Encoding.locale_charmap を見てください。
このメソッドは MIME エンコードされた文字列を展開し、
いわゆる半角カナを全角に変換します。
これらを変換したくない場合は、 String#encode
を使ってください。
@see Kconv.#tolocale... -
String
# toeuc -> String (36309.0) -
self のエンコーディングを EUC-JP に変換した文字列を 返します。変換元のエンコーディングは文字列の内容から推測します。
...ングは文字列の内容から推測します。
このメソッドは MIME エンコードされた文字列を展開し、
いわゆる半角カナを全角に変換します。
これらを変換したくない場合は、 NKF.#nkf('-exm0', str)
を使ってください。
@see Kconv.#toeuc... -
String
# tojis -> String (36309.0) -
self のエンコーディングを iso-2022-jp に変換した文字列を 返します。変換元のエンコーディングは文字列の内容から推測します。
...ングは文字列の内容から推測します。
このメソッドは MIME エンコードされた文字列を展開し、
いわゆる半角カナを全角に変換します。
これらを変換したくない場合は、 NKF.#nkf('-jxm0', str)
を使ってください。
@see Kconv.#tojis... -
String
# tosjis -> String (36309.0) -
self のエンコーディングを shift_jis に変換した文字列を 返します。変換元のエンコーディングは文字列の内容から推測します。
...グは文字列の内容から推測します。
このメソッドは MIME エンコードされた文字列を展開し、
いわゆる半角カナを全角に変換します。
これらを変換したくない場合は、 NKF.#nkf('-sxm0', str)
を使ってください。
@see Kconv.#tosjis... -
String
# toutf16 -> String (36309.0) -
self のエンコーディングを UTF-16BE に変換した文字列を 返します。変換元のエンコーディングは文字列の内容から推測します。
...は文字列の内容から推測します。
このメソッドは MIME エンコードされた文字列を展開し、
いわゆる半角カナを全角に変換します。
これらを変換したくない場合は、 NKF.#nkf('-w16xm0', str)
を使ってください。
@see Kconv.#toutf16... -
String
# toutf32 -> String (36309.0) -
self のエンコーディングを UTF-32 に変換した文字列を 返します。変換元のエンコーディングは文字列の内容から推測します。
...は文字列の内容から推測します。
このメソッドは MIME エンコードされた文字列を展開し、
いわゆる半角カナを全角に変換します。
これらを変換したくない場合は、 NKF.#nkf('-w32xm0', str)
を使ってください。
@see Kconv.#toutf32... -
String
# toutf8 -> String (36309.0) -
self のエンコーディングを UTF-8 に変換した文字列を 返します。変換元のエンコーディングは文字列の内容から推測します。
...グは文字列の内容から推測します。
このメソッドは MIME エンコードされた文字列を展開し、
いわゆる半角カナを全角に変換します。
これらを変換したくない場合は、 NKF.#nkf('-wxm0', str)
を使ってください。
@see Kconv.#toutf8... -
String
# to _ i(base = 10) -> Integer (36282.0) -
文字列を 10 進数表現された整数であると解釈して、整数に変換します。
....to_i # => 10
p "+10".to_i # => 10
p "-10".to_i # => -10
p "010".to_i # => 10
p "-010".to_i # => -10
//}
整数とみなせない文字があればそこまでを変換対象とします。
変換対象が空文字列であれば 0 を返します。
//emlist[例][ruby]{
p "0x11".to......_i # => 0
p "".to_i # => 0
//}
基数を指定することでデフォルトの 10 進以外に 2 〜 36 進数表現へ変換できます。
それぞれ Ruby の整数リテラルで使用可能なプリフィクスは無視されます。
また、base に 0 を指定するとプリフ......]{
p "01".to_i(2) # => 1
p "0b1".to_i(2) # => 1
p "07".to_i(8) # => 7
p "0o7".to_i(8) # => 7
p "1f".to_i(16) # => 31
p "0x1f".to_i(16) # => 31
p "0b10".to_i(0) # => 2
p "0o10".to_i(0) # => 8
p "010".to_i(0) # => 8
p "0d10".to_i(0) # => 10
p "0x10".to_i(0) # => 16
//}
@param bas... -
String
# to _ f -> Float (36240.0) -
文字列を 10 進数表現と解釈して、浮動小数点数 Float に変換します。
...uby]{
p "-10".to_f # => -10.0
p "10e2".to_f # => 1000.0
p "1e-2".to_f # => 0.01
p ".1".to_f # => 0.1
p "1_0_0".to_f # => 100.0 # 数値リテラルと同じように区切りに _ を使える
p " \n10".to_f # => 10.0 # 先頭の空白・改行は無視される
p "7xa.5".to_f # => 7.0
//......返します。
変換対象が空文字列のケースでも、0.0 を返します。
//emlist[][ruby]{
p "".to_f # => 0.0
p "nan".to_f # => 0.0
p "INF".to_f # => 0.0
p "-Inf".to_f # => 0.0
//}
変換後の Float が有限の値を取れないときは、Float::INFINITY を用います......2
p ("10" * 1000).to_f # => Infinity
# warning: Float 10101010101010101010... out of range
//}
なお、このメソッドとは逆に、数値を文字列に変換するには
Kernel.#sprintf, String#%, Integer#to_s
を使用します。
@see String#hex, String#oct, String#to_i,
Kernel.#I...