Is there something that can do this in Ruby?
a = 'astring'[0..[5,'astring'.length].min]
Can anything take that string and generate a integer from it? In Python I could use:
int(a,36)
The output would be "18141102".
Is there something that can do this in Ruby?
a = 'astring'[0..[5,'astring'.length].min]
Can anything take that string and generate a integer from it? In Python I could use:
int(a,36)
The output would be "18141102".