Sha256: a38cd691ec2f9bc1b698c7350c560c320457e3b4429dc0c489e01a77f27815a7
Contents?: true
Size: 1.52 KB
Versions: 1
Compression:
Stored size: 1.52 KB
Contents
= Radix * http://death.rubyforge.org * http://death.rubyforge.org/radix == DESCRIPTION Radix provides the means of converting to and from any base. In addition, representational notations need not be in ASCII order; any user-defined notation can be used upto base 62. == FEATURES/ISSUES * Convert to and from any base. * User-definable character set upto base 62. * Defaults to standard base 62. * Can be used to encode strings. == RELEASE NOTES Please see HISTORY file. == SYNOPSIS Base conversions with ASCII ordered notations are easy in Ruby. 255.to_s(16) #=> "FF" "FF".to_i(16) #=> 255 But Ruby reaches it's limit at base 36. 255.to_s(37) #=> Error Radix provides the means of converting to and from any base. Radix.convert_base([100, 10], 256, 10) #=> [2,5,6,1,0] And it can handle any notation upto base 62. Radix.convert("10", 62, 10) #=> "62" And the notations need not be in ASCII order --odd notations can be used. b10 = Radix.new([:Q, :W, :E, :R, :T, :Y, :U, :I, :O, :U]) b10.convert("FF", 16) #=> "EYY" == HOW TO INSTALL To install with RubyGems simply open a console and type: gem install radix Site installation requires Setup.rb (gem install setup), then download the tarball package and type: tar -xvzf radix-1.0.0.tgz cd radix-1.0.0 sudo setup.rb all Windows users use 'ruby setup.rb all'. == LINCENSE/COPYRIGHT Copyright (c) 2006 The Coding Dead <http://death.rubyforge.org> This program is ditributed unser the terms of the LGPLv3 license. See LICENSE file for details.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
radix-1.0.0 | README |