rich manalang

aka @rmanalan
« Back to blog
Mar 17
Views

Base 36 for shortening URLs

1234567890.to_s(36) #kf12oi
"kf12oi".to_i(36) #1234567890

My first ever WikiPedia contribution! I love the terseness of Ruby. Compare that to the C# example on the same page.