0
0

More than 3 years have passed since last update.

【Ruby】文字列を数値へ変換するメソッド

Last updated at Posted at 2021-01-30

.to_iメソッド 整数値へ変換します

.to_fメソッド 小数点値へ変換します。

変数.map(&:to_i) 変数に入っている値を整数値へ変換します

変数.map(&:to_f) 変数に入っている値を小数値へ変換します

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0