Example: Check whether a character is a directory separator

public static int main (string[] args) {
// Output: ``false``
bool res = Path.is_dir_separator ('i');
print ("%s\n", res.to_string ());

// Output: ``true``
res = Path.is_dir_separator ('/') || Path.is_dir_separator ('\\');
print ("%s\n", res.to_string ());

return 0;
}

 valac --pkg glib-2.0 GLib.Path.is_dir_separator.vala

See: