def style_multiline(text, styles, ljust=0, rjust=0, cen=0, lpad=0, rpad=0, pad=0, char=' '):
    if not text:
        return ''
    lines = text.split('\n')
    fmt_text = ''
    for text in lines:
        text = style_text(text, styles, ljust, rjust, cen, lpad, rpad, pad, char)
        fmt_text += text + '\n'
    return fmt_text