Sets indentation of a single/multi-line string.

def set( string, target_level, indent_string="    ", indent_empty_lines=False ):
    """ Sets indentation of a single/multi-line string. """

    lines = string.splitlines()
    set_lines( lines, target_level, indent_string=indent_string, indent_empty_lines=indent_empty_lines )
    result = "\n".join(lines)
    return result