Example: Uchar to string

public static int main (string[] args) {
// Output: ``97``
uchar c = 'a';
print ("%s\n", c.to_string ());

// Output: ``122``
c = 'z';
print ("%s\n", c.to_string ());

// Output: ``57``
c = '9';
print ("%s\n", c.to_string ());

return 0;
}

 valac --pkg glib-2.0 uchar.to_string.vala

See:




2022 vala-language.org