isalnum


Description:

public bool isalnum ()

Determines whether a character is alphanumeric.

Given some UTF-8 text, obtain a character value with utf8_get_char.

Example: Determine whether a character is alphanumeric:

public static int main (string[] args) {
unichar[] chars = {'a', 'z', 'A', 'Z', '0', '9',
'α', 'Ω',
'一', '二', // ichi, 1; ni, 2
'!', ',', '\n'};

// Output: ``true true true true true true true true true true false false false``
foreach (unichar c in chars) {
print ("%s ", c.isalnum ().to_string ());
}
print ("\n");
return 0;
}

valac --pkg glib-2.0 unichar.isalnum.vala

Parameters:

c

a Unicode character

Returns:

true if c is an alphanumeric character