import io


def strip_fixed(fstr):
    """
    Take a psc file string and return two strings: (1) The file header
    containing the "FIX: " line and (2) the remainder of file.

    Parameters
    ----------
    fstr : str
        String representation of psc file.

    Returns
    -------
    tuple of str
        1st element contains file header, second the remainder of the file.

    See also
    --------
    psc_to_str
    mod_to_str
    """
    Fi = io.StringIO()
    Fi.write(fstr)
    Fi.seek(0)
    Fo = io.StringIO()
    Fhead = None
    for line in Fi:
        if line[:4] == "FIX:":
            Fhead = line.strip()
            Fo.write('\n')
        else:
            Fo.write(line)
    Fo.seek(0)
    return Fhead, Fo.read()