'Get the index of a char (needle) in a string (haystack).
Return:
The position where needle was found, or None if it wasn\'t found.'

def _get_index(self, haystack, needle):

    try:
        return haystack.index(needle)
    except ValueError:
        return None
