code: def _str_to_ord(content, weights):
    
    ordinal = 0
    for i, c in enumerate(content):
      ordinal += weights[i] * _ALPHABET.index(c) + 1
    return ordinal
docs: Converts a string to its lexicographical order.
  
    Args:
      content: the string to convert. Of type str.
      weights: weights from _get_weights.
  
    Returns:
      an int or long that represents the order of this string. "" has order 0.