LoginSignup
3
2

More than 1 year has passed since last update.

Rails | 数字をバイト数に変換する

Last updated at Posted at 2015-12-22

こんなのあったんだ。

バイト

10.bytes

# => 10

キロバイト

10.kilobytes

=> 10240

メガバイト

10.megabytes

=> 10485760

ギガバイト

10.gigabytes

=> 10737418240

テラバイト

10.terabytes 

=> 10995116277760

ペタバイト

10.petabytes 

=> 11258999068426240

エクサバイト

10.exabytes

=> 11529215046068469760

環境

  • Rails 4.0.13

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

メンター受付

3
2
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
3
2