るりまサーチ

最速Rubyリファレンスマニュアル検索!
33件ヒット [1-33件を表示] (0.081秒)

別のキーワード

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

ライブラリ

クラス

キーワード

検索結果

Fixnum#to_s(base = 10) -> String (24138.0)

self を引数で指定した基数の文字列表現に変換します。

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

@param base 基数を 2 から 36 の整数で指定します。

12345.to_s #=> "12345"
12345.to_s(2) #=> "11000000111001"
12345.to_s(8) #=> "30071"
12345.to_s(10) #=> "12345"
12345.to_s(16) #=> "3039"
12345.to_s(36) #=> "9ix"...

Exception#to_s -> String (15108.0)

エラーメッセージをあらわす文字列を返します。

...エラーメッセージをあらわす文字列を返します。

//emlist[例][ruby]{
begin
1 + nil
rescue => e
p e.message #=> "nil can't be coerced into Fixnum"
end
//}...

Fixnum#inspect(base = 10) -> String (9038.0)

self を引数で指定した基数の文字列表現に変換します。

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

@param base 基数を 2 から 36 の整数で指定します。

12345.to_s #=> "12345"
12345.to_s(2) #=> "11000000111001"
12345.to_s(8) #=> "30071"
12345.to_s(10) #=> "12345"
12345.to_s(16) #=> "3039"
12345.to_s(36) #=> "9ix"...

IO#<<(object) -> self (23.0)

object を出力します。object が文字列でない時にはメソッ ド to_s を用いて文字列に変換します。

...ect を出力します。object が文字列でない時にはメソッ
to_s を用いて文字列に変換します。

以下のような << の連鎖を使うことができます。

STDOUT << 1 << " is a " << Fixnum << "\n"

@param object 出力したいオブジェクトを与えます...

Exception#message -> String (8.0)

エラーメッセージをあらわす文字列を返します。

...エラーメッセージをあらわす文字列を返します。

//emlist[例][ruby]{
begin
1 + nil
rescue => e
p e.message #=> "nil can't be coerced into Fixnum"
end
//}...

絞り込み条件を変える