SI
Constants
ALIASES = {"u" => "µ"}
EXPONENTS = {} of String => Int32
PARSE_REGEX = /^([\-0-9.]+)\s?([#{EXPONENTS.keys.join}])(.*)/
PARSE_REGEX_NO_EXPONENT = /^([\-0-9.]+)\s?(.*)/
PREFIXES = {-8 => "y", -7 => "z", -6 => "a", -5 => "f", -4 => "p", -3 => "n", -2 => "µ", -1 => "m", 0 => "", 1 => "k", 2 => "M", 3 => "G", 4 => "T", 5 => "P", 6 => "E", 7 => "Z", 8 => "Y"}
Class methods
format(number, unit, separator = " ", base = 1000)
Sourceparse(formatted, base = 1000)
Source