|
ICU 76.1 76.1
|
C API: API for accessing ICU version numbers. More...
Go to the source code of this file.
Macros | |
| #define | U_COPYRIGHT_STRING_LENGTH 128 |
| Maximum length of the copyright string. | |
| #define | U_MAX_VERSION_LENGTH 4 |
| An ICU version consists of up to 4 numbers from 0..255. | |
| #define | U_VERSION_DELIMITER '.' |
| In a string, ICU version fields are delimited by dots. | |
| #define | U_MAX_VERSION_STRING_LENGTH 20 |
| The maximum length of an ICU version string. | |
Typedefs | |
| typedef uint8_t | UVersionInfo[U_MAX_VERSION_LENGTH] |
| The binary form of a version on ICU APIs is an array of 4 uint8_t. | |
Functions | |
| U_CAPI void | u_versionFromString (UVersionInfo versionArray, const char *versionString) |
| Parse a string with dotted-decimal version information and fill in a UVersionInfo structure with the result. | |
| U_CAPI void | u_versionFromUString (UVersionInfo versionArray, const UChar *versionString) |
| Parse a Unicode string with dotted-decimal version information and fill in a UVersionInfo structure with the result. | |
| U_CAPI void | u_versionToString (const UVersionInfo versionArray, char *versionString) |
| Write a string with dotted-decimal version information according to the input UVersionInfo. | |
| U_CAPI void | u_getVersion (UVersionInfo versionArray) |
| Gets the ICU release version. | |
C API: API for accessing ICU version numbers.
Definition in file uversion.h.
| #define U_COPYRIGHT_STRING_LENGTH 128 |
| #define U_MAX_VERSION_LENGTH 4 |
An ICU version consists of up to 4 numbers from 0..255.
Definition at line 43 of file uversion.h.
| #define U_MAX_VERSION_STRING_LENGTH 20 |
The maximum length of an ICU version string.
Definition at line 53 of file uversion.h.
| #define U_VERSION_DELIMITER '.' |
In a string, ICU version fields are delimited by dots.
Definition at line 48 of file uversion.h.
| typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH] |
The binary form of a version on ICU APIs is an array of 4 uint8_t.
To compare two versions, use memcmp(v1,v2,sizeof(UVersionInfo)).
Definition at line 59 of file uversion.h.
| U_CAPI void u_getVersion | ( | UVersionInfo | versionArray | ) |
Gets the ICU release version.
The version array stores the version information for ICU. For example, release "1.3.31.2" is then represented as 0x01031F02. Definition of this function lives in putil.c
| versionArray | the version # information, the result will be filled in |
| U_CAPI void u_versionFromString | ( | UVersionInfo | versionArray, |
| const char * | versionString ) |
Parse a string with dotted-decimal version information and fill in a UVersionInfo structure with the result.
Definition of this function lives in putil.c
| versionArray | The destination structure for the version information. |
| versionString | A string with dotted-decimal version information, with up to four non-negative number fields with values of up to 255 each. |
| U_CAPI void u_versionFromUString | ( | UVersionInfo | versionArray, |
| const UChar * | versionString ) |
Parse a Unicode string with dotted-decimal version information and fill in a UVersionInfo structure with the result.
Definition of this function lives in putil.c
| versionArray | The destination structure for the version information. |
| versionString | A Unicode string with dotted-decimal version information, with up to four non-negative number fields with values of up to 255 each. |
| U_CAPI void u_versionToString | ( | const UVersionInfo | versionArray, |
| char * | versionString ) |
Write a string with dotted-decimal version information according to the input UVersionInfo.
Definition of this function lives in putil.c
| versionArray | The version information to be written as a string. |
| versionString | A string buffer that will be filled in with a string corresponding to the numeric version information in versionArray. The buffer size must be at least U_MAX_VERSION_STRING_LENGTH. |