lib/secret_sharing/charset.rb
def char_to_codepoint(c)
      codepoint = charset.index c
      if codepoint.nil?
        fail NotInCharset, "Char \"#{c}\" not part of the supported charset"
      end
      codepoint
    end
def char_to_codepoint(c)
      codepoint = charset.index c
      if codepoint.nil?
        fail NotInCharset, "Char \"#{c}\" not part of the supported charset"
      end
      codepoint
    end
Convert a single character into its integer representation according to
 the charset.

 Example

   charset = SecretSharing::Charset.by_charset_string "abc"
   charset.char_to_codepoint "a"
   # => 1

 @param c [String] Character to retrieve its codepoint in the charset
 @return [Integer] Codepoint within the charset