Function

GLibascii_toupper

since: 2.0

Declaration

gchar
g_ascii_toupper (
  gchar c
)

Description

Convert a character to ASCII upper case.

Unlike the standard C library toupper() function, this only recognizes standard ASCII letters and ignores the locale, returning all non-ASCII characters unchanged, even if they are upper case letters in a particular character set. Also unlike the standard library function, this takes and returns a char, not an int, so don’t call it on EOF but no need to worry about casting to #guchar before passing a possibly non-ASCII character in.

Available since: 2.0

Parameters

c

Type: gchar

Any character.

Return value

Type: gchar

The result of converting c to upper case. If c is not an ASCII lower case letter, c is returned unchanged.