Tizen Native API
5.5
|
Uversion module provides API for accessing ICU version numbers.
Required Header
#include <utils_i18n.h>
Overview
Uversion module provides API for accessing ICU version numbers.
Functions | |
int | i18n_uversion_get_version (i18n_uversion_info version_array) |
Gets the ICU release version. | |
int | i18n_uversion_from_string (const char *version_string, i18n_uversion_info version_array) |
Parses a string with dotted-decimal version information and fills in an i18n_uversion_info array with the result. | |
int | i18n_uversion_from_ustring (const i18n_uchar *version_string, i18n_uversion_info version_array) |
Parses a Unicode string with dotted-decimal version information and fills in an i18n_uversion_info array with the result. | |
int | i18n_uversion_to_string (const i18n_uversion_info version_array, char *version_string) |
Writes a string with dotted-decimal version information according to the input i18n_uversion_info object. | |
Typedefs | |
typedef uint8_t | i18n_uversion_info [4] |
The binary form of a version on ICU APIs. | |
Defines | |
#define | I18N_UVERSION_COPYRIGHT_STRING_LENGTH 128 |
Maximum length of the copyright string. | |
#define | I18N_UVERSION_MAX_VERSION_LENGTH 4 |
Maximum number of numbers ICU version consists of. | |
#define | I18N_UVERSION_MAX_VERSION_STRING_LENGTH 20 |
The maximum length of an ICU version string. | |
#define | I18N_UVERSION_DELIMITER '.' |
Delimiter used to delimit ICU version fields in a string. |
Define Documentation
#define I18N_UVERSION_COPYRIGHT_STRING_LENGTH 128 |
Maximum length of the copyright string.
- Since :
- 4.0
#define I18N_UVERSION_DELIMITER '.' |
Delimiter used to delimit ICU version fields in a string.
- Since :
- 4.0
#define I18N_UVERSION_MAX_VERSION_LENGTH 4 |
Maximum number of numbers ICU version consists of.
Each number has value from 0 to 255.
- Since :
- 4.0
#define I18N_UVERSION_MAX_VERSION_STRING_LENGTH 20 |
The maximum length of an ICU version string.
- Since :
- 4.0
Typedef Documentation
typedef uint8_t i18n_uversion_info[4] |
The binary form of a version on ICU APIs.
To compare two versions, use memcmp(v1,v2,sizeof(i18n_uversion_info)).
- Since :
- 4.0
Function Documentation
int i18n_uversion_from_string | ( | const char * | version_string, |
i18n_uversion_info | version_array | ||
) |
Parses a string with dotted-decimal version information and fills in an i18n_uversion_info array with the result.
- Since :
- 4.0
- Parameters:
-
[in] version_string A string with dotted-decimal version information, with up to I18N_UVERSION_MAX_VERSION_LENGTH non-negative number fields with values of up to 255 each [out] version_array An array which will contain the version
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter
int i18n_uversion_from_ustring | ( | const i18n_uchar * | version_string, |
i18n_uversion_info | version_array | ||
) |
Parses a Unicode string with dotted-decimal version information and fills in an i18n_uversion_info array with the result.
- Since :
- 4.0
- Parameters:
-
[in] version_string A Unicode string with dotted-decimal version information, with up to I18N_UVERSION_MAX_VERSION_LENGTH non-negative number fields with values of up to 255 each [out] version_array An array which will contain the version
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter
int i18n_uversion_get_version | ( | i18n_uversion_info | version_array | ) |
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.
- Since :
- 4.0
- Parameters:
-
[out] version_array An array which will contain the version
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter
int i18n_uversion_to_string | ( | const i18n_uversion_info | version_array, |
char * | version_string | ||
) |
Writes a string with dotted-decimal version information according to the input i18n_uversion_info object.
- Since :
- 4.0
- Parameters:
-
[in] version_array The version information to be written as a string. [out] version_string A string buffer that will be filled in with a string corresponding to the numeric version information in version_array. The buffer size must be at least I18N_UVERSION_MAX_VERSION_STRING_LENGTH.
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter