def find_str(s, char):
    """Finds a substring in a string.

    :param s: String you are searching in.
    :param char: String you are searching for.
    :return: If the substring is found it returns the index of the first occurrence, otherwise returns -1.
    """
    index = 0
    if char in s:
        c = char[0]
        for ch in s:
            if ch == c:
                if s[index:index + len(char)] == char:
                    return index
            index += 1
    return -1
