るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.082秒)
トップページ > クラス:Numeric[x] > バージョン:2.6.0[x] > クエリ:numeric[x] > クエリ:i[x] > クエリ:to_int[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. csv to_i
  5. bigdecimal to_i

ライブラリ

検索結果

Numeric#to_int -> Integer (100009.0)

self.to_i と同じです。

self.to_i と同じです。

//emlist[例][ruby]{
(2+0i).to_int # => 2
Rational(3).to_int # => 3
//}