lib/secret_sharing/charset.rb
def s_to_i(string)
      string.chars.reduce(0) do |output, char|
        output * charset.length + char_to_codepoint(char)
      end
    end
def s_to_i(string)
      string.chars.reduce(0) do |output, char|
        output * charset.length + char_to_codepoint(char)
      end
    end
Calculate an integer from a string.

 Example

   charset = SecretSharing::Charset.by_charset_string "abc"
   charset.s_to_i "ab"
   # => 6

 @param string [Integer] integer to convert to string
 @return [String] converted string