def _read_string(fid, n_bytes, decode=True):
    s0 = fid.read(n_bytes)
    s = s0.split(b'\x00')[0]
    return s.decode('utf-8') if decode else s
Handle command line flags unique to this script.
dataset/ETHPy150Open mne-tools/mne-python/mne/io/ctf/res4.py/_read_string--crossover with--dataset/ETHPy150Open google/gfw-toolkit/api_sample/peopletool.py/_ParseFlags