Sha256: 650b1dd5c76fdbf7d9dcc494b596af3e1f5a441a6e95e653b86302aa05c561e2
Contents?: true
Size: 356 Bytes
Versions: 1
Compression:
Stored size: 356 Bytes
Contents
# Encoding/decoding with custom character sets (#12) There is not problem converting a numeric value into a custom base. c62 = (0..9).map{ |x| x.to_s } + ('a'..'z').to_a + ('A'..'Z').to_a 809145531659995.b(c62).to_s #=> "3HLszsQsP" But there was a problem with decoding custom number back. "3HLszsQsP".b(c62).to_i #=> 809145531659995
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
radix-2.2.1 | demo/issues/012_array_base.md |