def format_string(string, width, truncate=True):
    """ Truncate the line or add spaces if needed
    When !truncate, list is returned for each line
    """
    if truncate:
        space = width - len(string)
        if 0 > space:
            return string[:space - 1] + '…'
        else:
            return string + ' ' * space
    else:
        strings = []
        string_list = string.split(' ')
        while string_list:
            line = ''
            remain = width
            while string_list and len(string_list[0]) <= remain:
                s = string_list.pop(0)
                line += s + ' '
                remain -= len(s) + 1
            if not line:
                line = string_list[0][:width]
                string_list[0] = string_list[0][width:]
                strings.append(line)
            else:
                line = line[:-1]
                remain += 1
                strings.append(line + ' ' * remain)
        return strings
