puts


Description:

[ CCode ( cname = "fputs" , instance_pos = -1 ) ]
public int puts (string s)

Writes string s to the given output stream

Example: Write a string to the stream:

// Appends the current DateTime to "test.log"
static int main () {
FileStream file = FileStream.open ("test.log", "a");
assert (file != null);

file.puts (new DateTime.now_local ().to_string ());
file.putc ('\n');
return 0;
}

valac --pkg glib-2.0 GLib.FileStream.puts.vala

Parameters:

s

string to be written

Returns:

non-negative number on success or GLib.FileStream.EOF otherwise