66件ヒット
[1-66件を表示]
(0.136秒)
ライブラリ
- ビルトイン (44)
- csv (11)
-
webrick
/ httpresponse (11)
クラス
- CSV (11)
- IO (11)
- String (33)
-
WEBrick
:: HTTPResponse (11)
キーワード
-
content
_ length (11) - hex (11)
- ioctl (22)
-
to
_ i (11)
検索結果
先頭5件
-
String
# oct -> Integer (18274.0) -
文字列を 8 進文字列であると解釈して、整数に変換します。
...例][ruby]{
p "10".oct # => 8
p "010".oct # => 8
p "8".oct # => 0
//}
oct は文字列の接頭辞 ("0", "0b", "0B", "0x", "0X") に応じて
8 進以外の変換も行います。
//emlist[例][ruby]{
p "0b10".oct # => 2
p "10".oct # => 8
p "010".oct # => 8
p "0x10".oct # => 16
//}
整......[例][ruby]{
p "-010".oct # => -8
p "-0x10".oct # => -16
p "-0b10".oct # => -2
p "1_0_1x".oct # => 65
//}
@see String#hex, String#to_i, String#to_f,
Kernel.#Integer, Kernel.#Float
逆に、数値を文字列に変換するにはKernel.#sprintf,
String#%, Integer#to_s を使用し... -
CSV
# ioctl(cmd , arg = 0) -> Integer (6201.0) -
IO#ioctl に委譲します。
...IO#ioctl に委譲します。
@see IO#ioctl... -
IO
# ioctl(cmd , arg = 0) -> Integer (6201.0) -
IO に対してシステムコール ioctl を実行し、その結果を返します。 機能の詳細は ioctl(2) を参照してください。
...IO に対してシステムコール ioctl を実行し、その結果を返します。
機能の詳細は ioctl(2) を参照してください。
@param cmd IO に対するコマンドを整数で指定します。どのようなコマンドが使えるかはプラットフォームに依存し......ます。
@param arg cmd に対する引数を指定します。整数の時にはその値を ioctl に渡します。
文字列の場合には Array#pack した構造体だとみなして渡します。
arg が nil か false の場合には 0を、true の場合には 1 を... -
String
# hex -> Integer (107.0) -
文字列に 16 進数で数値が表現されていると解釈して整数に変換します。 接頭辞 "0x", "0X" とアンダースコアは無視されます。 文字列が [_0-9a-fA-F] 以外の文字を含むときはその文字以降を無視します。
...# => 0
p "10z".hex # => 16
p "1_0".hex # => 16
p "".hex # => 0
//}
@see String#oct, String#to_i, String#to_f,
Kernel.#Integer, Kernel.#Float
このメソッドの逆に数値を文字列に変換するには
Kernel.#sprintf, String#%,
Integer#to_s
などを使ってください。... -
String
# to _ i(base = 10) -> Integer (107.0) -
文字列を 10 進数表現された整数であると解釈して、整数に変換します。
...する整数。0 か、2〜36 の整数。
@return 整数
このメソッドの逆に数値を文字列に変換するには、
Kernel.#sprintf, String#%, Integer#to_s
を使用します。
String#hex, String#oct, String#to_f,
Kernel.#Integer, Kernel.#Float
も参照してください。... -
WEBrick
:: HTTPResponse # content _ length -> Integer | nil (107.0) -
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
...'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
f = File.new('testfile')
res.body = f
res.content_length = 2
print res.to_s
#=> 出力結果
HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 12:04:32 GMT
Server:
Content-Length: 2
ho...