printf


Description:

[ CCode ( cname = "g_strdup_printf" ) ]
[ PrintfFormat ]
public string printf (...)

Example: Format a string with printf:

public static int main (string[] args) {
// Output: ``Shut up, K-9!``
string res = "Shut %s, %c-%d!\n".printf ("up", 'K', 9);
print (res);
return 0;
}

valac --pkg glib-2.0 string.printf.vala