code: def stringIndex(self, string):
          
          if string in self.table:
              return self.table[string]
          else:
              result = self.current_index
              self.table[string] = result
              self.current_index += self.c_strlen(string)
              return result
docs: Returns the index in the table of the provided string. Adds the string to
          the table if it's not there.
          :param string: the input string.