def extract_before(source: str, end: str) -> str:
    """Extract all of the characters before start.

    :param source: The input string from which to extract a substring.
    :param end: The substring that marks the place where extraction will end.
    :param return: A substring that is extracted from ``source``.
    :note: The ``end`` string is not include in the result.
    """
    return source[:source.find(end)]