Bump to 1.1
[platform/upstream/libunistring.git] / doc / uniname.texi
1 @node uniname.h
2 @chapter Names of Unicode characters @code{<uniname.h>}
3
4 @cindex Unicode character, name
5 This include file implements the association between a Unicode character and
6 its name.
7
8 The name of a Unicode character allows to distinguish it from other, similar
9 looking characters.  For example, the character @samp{x} has the name
10 @code{"LATIN SMALL LETTER X"} and is therefore different from the character
11 named @code{"MULTIPLICATION SIGN"}.
12
13 @deftypevr Macro {unsigned int} UNINAME_MAX
14 This macro expands to a constant that is the required size of buffer for a
15 Unicode character name.
16 @end deftypevr
17
18 @deftypefun {char *} unicode_character_name (ucs4_t@tie{}@var{uc}, char@tie{}*@var{buf})
19 Looks up the name of a Unicode character, in uppercase ASCII.
20 @var{buf} must point to a buffer, at least @code{UNINAME_MAX} bytes in size.
21 Returns the filled @var{buf}, or NULL if the character does not have a name.
22 @end deftypefun
23
24 @deftypefun ucs4_t unicode_name_character (const@tie{}char@tie{}*@var{name})
25 Looks up the Unicode character with a given name, in upper- or lowercase
26 ASCII.  @var{NAME} can also be an alias name of a character.
27 Returns the character if found, or @code{UNINAME_INVALID} if not found.
28 @end deftypefun
29
30 @deftypevr Macro ucs4_t UNINAME_INVALID
31 This macro expands to a constant that is a special return value of the
32 @code{unicode_name_character} function.
33 @end deftypevr