up


Description:

[ CCode ( cname = "g_utf8_strup" ) ]
public string up (ssize_t len = -1)

Converts all Unicode characters in the string that have a case to uppercase.

The exact manner that this is done depends on the current locale, and may result in the number of characters in the string increasing. (For instance, the German ess-zet will be changed to SS.)

Example: Convert all lowercase ASCII letters to uppercase:

public static int main (string[] args) {
// Output: ``YOU ADMIRE OUR TECHNOLOGY, HUMAN?``
string up = "You admire our technology, human?".up ();
print ("%s\n", up);
return 0;
}

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

Parameters:

len

length of str, in bytes, or -1 if str is nul-terminated.

str

a UTF-8 encoded string

Returns:

a newly allocated string, with all characters converted to uppercase.