def format_table_divider(scan_str, match_char='|', i_char='+', fill_char='-'):
    """ Format and return a divider for use in table printing

    Input:
        - scan_str: Full string to analyze for character matching
        - match_char: Character that indicates a match
        - i_char: Character to use in match positions
        - fill_char: Character to use in non-match positions

    Output: String to be used as a divider in tabular data output
    """
    i_positions = [idx for idx, c in enumerate(scan_str) if c == match_char]
    divider = ''
    for i in range(len(scan_str)):
        if i in i_positions:
            divider += i_char
        else:
            divider += fill_char
    return divider