(line, underline)
return False
Checks whether line and consecutive underline form valid section title.

    .. note::
        Function expects leading and trailing whitespaces removed for both strings prior to the call.

    :param line: String, title text
    :param underline: String, underlying characters
    :return: True if line and underline form valid section title
Checks whether line and consecutive underline form valid section title.
Checks whether line and consecutive underline form valid section title .
def is_section_title(line, underline):
    """
    Checks whether line and consecutive underline form valid section title.

    .. note::
        Function expects leading and trailing whitespaces removed for both strings prior to the call.

    :param line: String, title text
    :param underline: String, underlying characters
    :return: True if line and underline form valid section title
    """

    if line is None:
        return False

    if underline is None:
        return False

    if line == '':
        return False

    if underline == '':
        return False

    n = len(line)
    for c in UNDERLINE_CHARS:
        s = c * n
        if underline == s:
            return True

    return False
def is_section_title ( line , underline ) : if line is None : return False if underline is None : return False if line == '' : return False if underline == '' : return False n = len ( line ) for c in UNDERLINE_CHARS : s = c * n if underline == s : return True return False