'Return the width of the formatted curses message.
The height is defined by the maximum line.'

def get_stats_display_width(self, curse_msg, without_option=False):

    try:
        if without_option:
            c = len(max(''.join([(re.sub('[^\\x00-\\x7F]+', '    ', i['msg']) if (not i['optional']) else '') for i in curse_msg['msgdict']]).split('\n'), key=len))
        else:
            c = len(max(''.join([re.sub('[^\\x00-\\x7F]+', '    ', i['msg']) for i in curse_msg['msgdict']]).split('\n'), key=len))
    except Exception:
        return 0
    else:
        return c
