lib/extended_classes.rb
# this is used to convert numbers in the email IDs back to
# base 10
this is used to convert numbers in the email IDs back to
base 10
this is used to convert numbers in the email IDs back to base 10
def from_b(base=10)
    n = 0
    self.each_char do |ch|
      n = n*base
      m = ch.ord
      case
      when m>=97
        k = m-61
      when m>=65
        k = m-55
      when m>=48
        k = m-48
      end
      n += k
    end
    return n
  end
def from_b ( base = 10 ) n = 0 self . each_char do | ch | n = n * base m = ch . ord case when m >= 97 k = m - 61 when m >= 65 k = m - 55 when m >= 48 k = m - 48 end n += k end return n end
this is used to convert numbers in the email IDs back to
base 10
this is used to convert numbers in the email IDs back to base 10
base
<not_specific>