GLib.IOChannel.prototype.set_line_term

function set_line_term(line_term: String, length: Number(gint)): void {
    // Gjs wrapper for g_io_channel_set_line_term()
}
  

This sets the string that GLib.IOChannel uses to determine where in the file a line break occurs.

line_term

The line termination string. Use null for autodetect. Autodetection breaks on "\n", "\r\n", "\r", "\0", and the Unicode paragraph separator. Autodetection should not be used for anything other than file-based channels.

length

The length of the termination string. If -1 is passed, the string is assumed to be nul-terminated. This option allows termination strings with embedded nuls.