def _str2line(string, line):
    """fetch a line of a multi-line string"""
    lines = string.split('\n')
    if line >= len(lines):
        # return '' if indexed outside of nlines
        return ''
    else:
        return lines[line]