README.rdoc in anybase-0.0.9 vs README.rdoc in anybase-0.0.10
- old
+ new
@@ -18,14 +18,20 @@
base.to_i('F0A')
=> 3850
Anybase can also have synonyms.
- base = Anybase.new('0123456789abcdef', :synonyms => {'0' => 'oO'})
+ base = Anybase.new('0123456789abcdef', :synonyms => {'0' => 'oO'}, :ignore_case => true)
base.to_i('FoA')
=> 3850
base.to_i('FOA')
=> 3850
+
+If you just want to translate the number to look at it you can use #normalize
+
+ base = Anybase.new('0123456789abcdef', :synonyms => {'0' => 'oO'}, :ignore_case => true)
+ base.normalize('FoA')
+ => 'f0a'
Anybase can also zeropad your output with whatever your "zero" character is.
Anybase.new("012345678").to_native(1234, :zero_pad => 8)
=> '00001621'
\ No newline at end of file