def find_index_of(string, character, occurrence=1):
    """Find the n-th index of a character in a string."""
    count = 0
    for char_index in range(len(string)):
        if string[char_index] == character:
            count += 1
            if count == occurrence:
                return char_index
    return -1