All Projects → matiaskorhonen → radix62

matiaskorhonen / radix62

Licence: MIT license
Base 10 ↔ Base 62 conversions.

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to radix62

markup
DEPRECATED - This projects has been retired.
Stars: ✭ 25 (+56.25%)
Mutual labels:  unmaintained
lean-data-practices
INACTIVE - http://mzl.la/ghe-archive - A toolkit to implement Lean Data Practices at your company.
Stars: ✭ 141 (+781.25%)
Mutual labels:  unmaintained
linuxconsole
http://sourceforge.net/projects/linuxconsole/
Stars: ✭ 21 (+31.25%)
Mutual labels:  unmaintained
mozilla-download
DEPRECATED - Download firefox / b2g-desktop / mulet
Stars: ✭ 15 (-6.25%)
Mutual labels:  unmaintained
ledgible
Web-based double-entry accounting (ledger-cli frontend)
Stars: ✭ 58 (+262.5%)
Mutual labels:  unmaintained
alfresco-client-sdk
Alfresco Java Client SDK
Stars: ✭ 14 (-12.5%)
Mutual labels:  unmaintained
B2GOS-community
DEPRECATED - Tasks management for the B2G OS working groups
Stars: ✭ 11 (-31.25%)
Mutual labels:  unmaintained
socialapi-dev
DEPRECATED - Experimental support for a Social API in Firefox
Stars: ✭ 41 (+156.25%)
Mutual labels:  unmaintained
mortar-list-detail
INACTIVE - http://mzl.la/ghe-archive - A list detail view template for an Open Web App.
Stars: ✭ 21 (+31.25%)
Mutual labels:  unmaintained
data-act-pilot
This small DATA Act pilot contains code that translates agency data to a uniform DATA act format.
Stars: ✭ 20 (+25%)
Mutual labels:  unmaintained
obase
a port of the OpenBSD userland to Linux | unmaintained: use outils
Stars: ✭ 51 (+218.75%)
Mutual labels:  unmaintained
getpass
Portable getpass implementation for golang
Stars: ✭ 15 (-6.25%)
Mutual labels:  unmaintained
jscomplexity
💤 [Not maintained] JS cyclomatic complexity report generator
Stars: ✭ 30 (+87.5%)
Mutual labels:  unmaintained
feedthefox
INACTIVE - http://mzl.la/ghe-archive - [deprecated] Firefox OS Participation Hub
Stars: ✭ 12 (-25%)
Mutual labels:  unmaintained
devroadshow2017
INACTIVE - http://mzl.la/ghe-archive - Mozilla's Developer Roadshow 2017
Stars: ✭ 16 (+0%)
Mutual labels:  unmaintained
valgrind
DEPRECATED - git-svn copy of the valgrind subversion repo. Firefox OS specific patches applied in "fxos" branch.
Stars: ✭ 22 (+37.5%)
Mutual labels:  unmaintained
lumbergh
DEPRECATED - Whaaaat's happening? Careers website... Mmmkay?
Stars: ✭ 19 (+18.75%)
Mutual labels:  unmaintained
PyLMI-SDP
[UNMAINTAINED] Symbolic linear matrix inequalities (LMI) and semi-definite programming (SDP) tools for Python
Stars: ✭ 20 (+25%)
Mutual labels:  unmaintained
friendlycode
INACTIVE - http://mzl.la/ghe-archive - World's friendliest HTML editor.
Stars: ✭ 47 (+193.75%)
Mutual labels:  unmaintained
quality.mozilla.org
INACTIVE - http://mzl.la/ghe-archive - Mozilla's quality assurance community
Stars: ✭ 14 (-12.5%)
Mutual labels:  unmaintained

Radix62

Convert integers to base 62 strings and back.

Base 62 includes the numbers 0-9 and characters A-Z (both lower and upper case). This can be useful for applications such as URL shorteners.

Installation

Just like any other gem:

gem install radix62

Usage

Two methods are provided, Radix62#encode62 and Radix62#decode62

require "radix62"
Radix62.encode62(1000)                          #=> "g8"
Radix62.encode62(9999999)                       #=> "FXsj"
Radix62.decode62("a")                           #=> "10"
Radix62.decode62("A")                           #=> "36"
Radix62.decode62("Abc123")                      #=> "33146185555"
Radix62.decode62(Radix62.encode62(1234567890))  #=> 1234567890

Radix62 also adds the decode62 and encode62 convenience methods to the String and Integer classes, respectively.

1000.encode62                                   #=> "g8"
"Abc123".decode62                               #=> "33146185555"

Tests and compatibility

Build Status Code Climate

The gem is tested against MRI 1.8/1.9/2.0/2.1, JRuby, and Rubinius. See Travis CI for details.

License

Licensed under the MIT license, see the LICENSE file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].