るりまサーチ

最速Rubyリファレンスマニュアル検索!
4137件ヒット [1-100件を表示] (0.137秒)
トップページ > クエリ:I[x] > クエリ:to_s[x]

別のキーワード

  1. _builtin to_s
  2. openssl to_der
  3. openssl to_s
  4. _builtin to_a
  5. openssl to_pem

クラス

オブジェクト

キーワード

検索結果

<< 1 2 3 ... > >>

Integer#to_s(base=10) -> String (41225.0)

整数を 10 進文字列表現に変換します。

...文字列表
現に変換します。

//emlist[][ruby]{
p 10.to_s(2) # => "1010"
p 10.to_s(8) # => "12"
p 10.to_s(16) # => "a"
p 35.to_s(36) # => "z"
//}

@return 数値の文字列表現
@param base 基数となる 2 - 36 の数値。
@raise ArgumentError base に 2 - 36 以外の数...

IPAddr#to_s -> String (41207.0)

文字列に変換します。

...文字列に変換します。

require 'ipaddr'
addr6 = IPAddr.new('::1')
addr6.to_s #=> "::1"
addr6.to_string #=> "0000:0000:0000:0000:0000:0000:0000:0001"

@see IPAddr#to_string...

IRB::Context#to_s -> String (38201.0)

自身を人間に読みやすい文字列にして返します。

自身を人間に読みやすい文字列にして返します。

IPAddr#to_string -> String (32312.0)

標準的な文字列表現に変換します。

...標準的な文字列表現に変換します。

require 'ipaddr'
addr6 = IPAddr.new('::1')
addr6.to_s #=> "::1"
addr6.to_string #=> "0000:0000:0000:0000:0000:0000:0000:0001"

@see IPAddr#to_s...

Rake::InvocationChain::EmptyInvocationChain#to_s -> String (30201.0)

'TOP' という文字列を返します。

'TOP' という文字列を返します。

絞り込み条件を変える

Integer#inspect(base=10) -> String (29225.0)

整数を 10 進文字列表現に変換します。

...文字列表
現に変換します。

//emlist[][ruby]{
p 10.to_s(2) # => "1010"
p 10.to_s(8) # => "12"
p 10.to_s(16) # => "a"
p 35.to_s(36) # => "z"
//}

@return 数値の文字列表現
@param base 基数となる 2 - 36 の数値。
@raise ArgumentError base に 2 - 36 以外の数...

IRB::Context#__to_s__ -> String (29201.0)

自身を文字列表現にしたオブジェクトを返します。

自身を文字列表現にしたオブジェクトを返します。

IRB::Context#inspect -> String (26201.0)

自身を人間に読みやすい文字列にして返します。

自身を人間に読みやすい文字列にして返します。

IO#syswrite(string) -> Integer (26116.0)

write(2) を用いて string を出力します。 string が文字列でなければ to_s による文字列化を試みます。 実際に出力できたバイト数を返します。

...write(2) を用いて string を出力します。
string が文字列でなければ to_s による文字列化を試みます。
実際に出力できたバイト数を返します。

stdio を経由しないので他の出力メソッドと混用すると思わぬ動作
をすることがあり...
...tring 自身に書き込みたい文字列を指定します。

@raise IOError 自身が書き込み用にオープンされていなければ発生します。

@raise Errno::EXXX 出力に失敗した場合に発生します。

//emlist[例][ruby]{
File.open("testfile", "w+") do |f|
f.syswrite...
...("ABCDE") # => 5
f.syswrite(:ABC) # => 3
end
File.read("testfile") # => "ABCDEABC"
//}...

IO#write(*str) -> Integer (26116.0)

IOポートに対して str を出力します。str が文字列でなけ れば to_s による文字列化を試みます。 実際に出力できたバイト数を返します。

...
I
Oポートに対して str を出力します。str が文字列でなけ
れば to_s による文字列化を試みます。
実際に出力できたバイト数を返します。

I
O#syswrite を除く全ての出力メソッドは、最終的に
"write" という名のメソッドを呼び出...
...ise IOError 自身が書き込み用にオープンされていなければ発生します。

@raise Errno::EXXX 出力に失敗した場合に発生します。

//emlist[例][ruby]{
File.open("textfile", "w+") do |f|
f.write("This is") # => 7
end
File.read("textfile") # => "This is"
//}
//emli...
...st[複数引数の例][ruby]{
File.open("textfile", "w+") do |f|
f.write("This is", " a test\n") # => 15
end
File.read("textfile") # => "This is a test\n"
//}...

絞り込み条件を変える

<< 1 2 3 ... > >>