to_little_endian


Description:

[ CCode ( cname = "GINT_TO_LE" ) ]
public int to_little_endian ()

Example: Int to little endian:

public static int main (string[] args) {
if (12345.to_little_endian () == 12345) {
print ("Little endian machine\n");
} else {
print ("Big endian machine\n");
}
return 0;
}

valac --pkg glib-2.0 int.to_little_endian.vala