def long_repeat(line: str) -> int:
    """
        length the longest substring that consists of the same char
    """
    if len(line) == 0:
        return 0
    if len(set(list(line))) == 1:
        return len(line)
    ans = 1
    count = 1
    for i in range(len(line)-1):
        if line[i] == line[i+1]:
            count += 1
        else:
            if count > ans:
                ans = count
            count = 1
    return ans