Function

GLibget_user_name

Declaration [src]

const gchar*
g_get_user_name (
  void
)

Description [src]

Gets the user name of the current user. The encoding of the returned string is system-defined. On UNIX, it might be the preferred file name encoding, or something else, and there is no guarantee that it is even consistent on a machine. On Windows, it is always UTF-8.

Return value

Type: const gchar*

The user name of the current user.

The data is owned by the called function.
The value is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows.