*
* int main()
* {
- * char *displayname;
+ * char *display_name;
* i18n_timezone_h timezone = NULL;
* i18n_error_code_e error_code;
* char timezone_id[10];
* snprintf(timezone_id, 10, (gmt<0)? "GMT%d:00" : "GMT+%d:00", gmt);
* error_code = i18n_timezone_create(&timezone, timezone_id);
* if (error_code!= I18N_ERROR_NONE) {
- * printf("Error i18n_timezone_create: %d\n", error_code);
- * return EXIT_FAILURE;
+ * printf("Error i18n_timezone_create: %d\n", error_code);
+ * return EXIT_FAILURE;
* }
*
- * error_code = i18n_timezone_get_display_name(timezone, &displayname);
+ * error_code = i18n_timezone_get_display_name(timezone, &display_name);
* if (error_code!= I18N_ERROR_NONE) {
- * printf("Error i18n_timezone_get_display_name: %d\n", error_code);
- * i18n_timezone_destroy(timezone);
- * return EXIT_FAILURE;
+ * printf("Error i18n_timezone_get_display_name: %d\n", error_code);
+ * i18n_timezone_destroy(timezone);
+ * return EXIT_FAILURE;
* }
- * printf("Created %s timezone displayname: %s\n", timezone_id, displayname);
- * free(displayname);
+ * printf("Created %s timezone display_name: %s\n", timezone_id, display_name);
+ * free(display_name);
* i18n_timezone_destroy(timezone);
* timezone = NULL;
* }
* {
* const char *language = I18N_ULOCALE_ENGLISH;
* const char *country = "US";
- * char *displayname;
+ * char *display_name;
* i18n_timezone_h timezone = NULL;
* i18n_error_code_e error_code;
* char timezone_id[10];
* snprintf(timezone_id, 10, (gmt<0)? "GMT%d:00" : "GMT+%d:00", gmt);
* error_code = i18n_timezone_create(&timezone, timezone_id);
* if (error_code!= I18N_ERROR_NONE) {
- * printf("Error i18n_timezone_create: %d\n", error_code);
- * return EXIT_FAILURE;
+ * printf("Error i18n_timezone_create: %d\n", error_code);
+ * return EXIT_FAILURE;
* }
*
- * error_code = i18n_timezone_get_display_name_with_locale(timezone, language, country, &displayname);
+ * error_code = i18n_timezone_get_display_name_with_locale(timezone, language, country, &display_name);
* if (error_code!= I18N_ERROR_NONE) {
- * printf("Error i18n_timezone_get_display_name_with_locale: %d\n", error_code);
- * i18n_timezone_destroy(timezone);
- * return EXIT_FAILURE;
+ * printf("Error i18n_timezone_get_display_name_with_locale: %d\n", error_code);
+ * i18n_timezone_destroy(timezone);
+ * return EXIT_FAILURE;
* }
- * printf("Created %s timezone displayname: %s\n", timezone_id, displayname);
- * free(displayname);
+ * printf("Created %s timezone display_name: %s\n", timezone_id, display)name);
+ * free(display_name);
*
* i18n_timezone_destroy(timezone);
* timezone = NULL;
* i18n_ubool daylight = true;
* i18n_timezone_display_type_e type = I18N_TIMEZONE_DISPLAY_TYPE_SHORT;
* i18n_error_code_e error_code;
- * char *displayname;
+ * char *display_name;
* char timezone_id[10];
* int gmt = -12;
* for(; gmt < 15; gmt++) {
* snprintf(timezone_id, 10, (gmt<0)? "GMT%d:00" : "GMT+%d:00", gmt);
* error_code = i18n_timezone_create(&timezone, timezone_id);
* if (error_code!= I18N_ERROR_NONE) {
- * printf("Error i18n_timezone_create: %d\n", error_code);
- * return EXIT_FAILURE;
+ * printf("Error i18n_timezone_create: %d\n", error_code);
+ * return EXIT_FAILURE;
* }
*
* for(; type <= I18N_TIMEZONE_DISPLAY_TYPE_GENERIC_LOCATION; type++) {
- * error_code = i18n_timezone_get_display_name_with_type(timezone, daylight, type, &displayname);
- * if (error_code!= I18N_ERROR_NONE) {
- * printf("Error i18n_timezone_get_display_name_with_type: %d\n", error_code);
- * i18n_timezone_destroy(timezone);
- * return EXIT_FAILURE;
- * }
- * printf("Created %s timezone displayname: %s\n", timezone_id, displayname);
- * free(displayname);
+ * error_code = i18n_timezone_get_display_name_with_type(timezone, daylight, type, &display_name);
+ * if (error_code!= I18N_ERROR_NONE) {
+ * printf("Error i18n_timezone_get_display_name_with_type: %d\n", error_code);
+ * i18n_timezone_destroy(timezone);
+ * return EXIT_FAILURE;
+ * }
+ * printf("Created %s timezone display_name: %s\n", timezone_id, display_name);
+ * free(display_name);
* }
*
* error_code = i18n_timezone_destroy(timezone);
* char *timezone_id = NULL;
* const char *language = I18N_ULOCALE_ENGLISH;
* const char *country = "US";
- * char *displayname;
+ * char *display_name;
*
* error_code = i18n_timezone_create_default(&timezone);
* if (error_code!= I18N_ERROR_NONE) {
* return EXIT_FAILURE;
* }
*
- * error_code = i18n_timezone_get_display_name_with_type_locale(timezone, daylight, style, language, country, &displayname);
+ * error_code = i18n_timezone_get_display_name_with_type_locale(timezone, daylight, style, language, country, &display_name);
* if (error_code!= I18N_ERROR_NONE) {
* printf("Error i18n_timezone_get_display_name_with_type_locale: %d\n", error_code);
* i18n_timezone_destroy(timezone);
* }
*
* i18n_timezone_get_id(timezone, &timezone_id);
- * printf("Created %s timezone displayname: %s\n", timezone_id, displayname);
+ * printf("Created %s timezone display_name: %s\n", timezone_id, display_name);
*
* i18n_timezone_destroy(timezone);
- * free(displayname);
+ * free(display_name);
* free(timezone_id);
*
* return EXIT_SUCCESS;
* @brief Opens a new #i18n_ubreak_iterator_h for locating text boundaries using specified breaking rules.
* @remarks Error codes are described in #i18n_error_code_e description.
* @since_tizen 2.3.1
- * @remarks The @a break_itr and @a parse_err should not be released.
+ * @remarks The @a break_iter and @a parse_err should not be released.
* @param[in] rules A set of rules specifying the text breaking conventions.
* @param[in] rules_length The number of characters in rules, or -1 if NULL-terminated.
* @param[in] text The text to be iterated over. May be @c NULL, in which case i18n_ubrk_set_text() is
* i18n_error_code_e error_code;
*
* error_code = i18n_ucalendar_create(NULL, -1, I18N_ULOCALE_US, I18N_UCALENDAR_DEFAULT, &cal);
- * if (error_code!= I18N_ERROR_NONE) {
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ucalendar_create: %d\n", error_code);
* return EXIT_FAILURE;
* }
* i18n_ucalendar_set_date_time(cal, 2000, 1, 1, 1, 1, 1);
*
* error_code = i18n_ucalendar_clone(cal, &identical_to_cal);
- * if (error_code!= I18N_ERROR_NONE) {
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ucalendar_clone: %d\n", error_code);
* i18n_ucalendar_destroy(cal);
* return EXIT_FAILURE;
* i18n_uenumeration_h enumeration = NULL;
* i18n_error_code_e error_code;
* error_code = i18n_ucalendar_timezone_id_enumeration_create(I18N_UCALENDAR_ZONE_TYPE_ANY, "US", NULL, &enumeration);
- * if (error_code!= I18N_ERROR_NONE) {
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ucalendar_timezone_id_enumeration_create: %d\n", error_code);
* return EXIT_FAILURE;
* }
* i18n_uenumeration_h enumeration = NULL;
* i18n_error_code_e error_code;
* error_code = i18n_ucalendar_timezones_create(&enumeration);
- * if (error_code!= I18N_ERROR_NONE) {
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ucalendar_timezones_create: %d\n", error_code);
* return EXIT_FAILURE;
* }
* i18n_uenumeration_h enumeration = NULL;
* i18n_error_code_e error_code;
* error_code = i18n_ucalendar_country_timezones_create("US", &enumeration);
- * if (error_code!= I18N_ERROR_NONE) {
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ucalendar_country_timezones_create: %d\n", error_code);
* return EXIT_FAILURE;
* }
* i18n_uenumeration_h enumeration = NULL;
*
* error_code = i18n_ucalendar_create(NULL, -1, I18N_ULOCALE_US, I18N_UCALENDAR_DEFAULT, &cal);
- * if (error_code!= I18N_ERROR_NONE) {
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ucalendar_create: %d\n", error_code);
* return EXIT_FAILURE;
* }
*
* int main() {
* i18n_error_code_e error_code;
- * i18n_uchar_iter_h uchar_iter = NULL;
- * error_code = i18n_uchar_iter_create(&uchar_iter);
+ * i18n_iter_h iter = NULL;
+ * error_code = i18n_iter_create(&iter);
* if (error_code != I18N_ERROR_NONE) {
- * printf("Error i18n_uchar_iter_create: %d\n", error_code);
+ * printf("Error i18n_iter_create: %d\n", error_code);
* return EXIT_FAILURE;
* }
- * i18n_uchar_iter_destroy(uchar_iter);
+ * i18n_iter_destroy(iter);
* return EXIT_SUCCESS;
* }
*
* #include <stdlib.h>
* #include <utils_i18n.h>
* int main() {
- * i18n_ucnv_h cnv;
+ * i18n_ucnv_h converter;
* i18n_error_code_e error_code;
- * error_code = i18n_ucnv_create("ibm-949", &cnv);
- * if (error_code!= I18N_ERROR_NONE) {
+ * error_code = i18n_ucnv_create("ibm-949", &converter);
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ucnv_create: %d\n", error_code);
* return EXIT_FAILURE;
* }
- * i18n_ucnv_destroy(cnv);
+ * i18n_ucnv_destroy(converter);
* return EXIT_SUCCESS;
* }
* @endcode
* #include <stdlib.h>
* #include <utils_i18n.h>
* int main() {
- * i18n_ucnv_h cnv;
+ * i18n_ucnv_h converter;
* i18n_error_code_e error_code;
- * i18n_uchar converter_name[] = {0x0069, 0x0062, 0x006d, 0x002d, 0x0039, 0x0034, 0x0033, 0x0000};
- * error_code = i18n_ucnv_create_unicode(converter_name, &cnv);
- * if (error_code!= I18N_ERROR_NONE) {
+ * i18n_uchar name[] = {0x0069, 0x0062, 0x006d, 0x002d, 0x0039, 0x0034, 0x0033, 0x0000};
+ * error_code = i18n_ucnv_create_unicode(name, &converter);
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ucnv_create: %d\n", error_code);
* return EXIT_FAILURE;
* }
- * i18n_ucnv_destroy(cnv);
+ * i18n_ucnv_destroy(converter);
* return EXIT_SUCCESS;
* }
* @endcode
* #include <stdlib.h>
* #include <utils_i18n.h>
* int main() {
- * i18n_ucnv_h cnv;
+ * i18n_ucnv_h converter;
* i18n_error_code_e error_code;
* int32_t ccsids[] = {37, 850, 943, 949, 950, 1047, 1252, 1392, 33722};
*
* for (int i = 0; i < 9; ++i)
* {
- * error_code = i18n_ucnv_create_ccsid(ccsids[i], I18N_UCNV_IBM, &cnv);
- * if (error_code!= I18N_ERROR_NONE) {
+ * error_code = i18n_ucnv_create_ccsid(ccsids[i], I18N_UCNV_IBM, &converter);
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ucnv_create_ccsid: %d\n", error_code);
* return EXIT_FAILURE;
* }
- * i18n_ucnv_destroy(cnv);
+ * i18n_ucnv_destroy(converter);
* }
* return EXIT_SUCCESS;
* }
* #include <stdlib.h>
* #include <utils_i18n.h>
* int main() {
- * i18n_ucnv_h cnv;
+ * i18n_ucnv_h converter;
* i18n_error_code_e error_code;
- * error_cod e= i18n_ucnv_create_package("", "", &cnv);
- * if (error_code!= I18N_ERROR_NONE) {
+ * error_code = i18n_ucnv_create_package("", "", &converter);
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ucnv_create_package: %d\n", error_code);
* return EXIT_FAILURE;
* }
- * i18n_ucnv_destroy(cnv);
+ * i18n_ucnv_destroy(converter);
* return EXIT_SUCCESS;
* }
* @endcode
* #include <stdlib.h>
* #include <utils_i18n.h>
* int main() {
- * i18n_ucnv_h cnv;
- * i18n_ucnv_h cnv2;
+ * i18n_ucnv_h converter;
+ * i18n_ucnv_h cloned_converter;
* i18n_error_code_e error_code;
- * error_code= i18n_ucnv_create("iso-8859-3", &cnv);
- * if (error_code!= I18N_ERROR_NONE) {
+ * error_code = i18n_ucnv_create("iso-8859-3", &converter);
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ucnv_create: %d\n", error_code);
* return EXIT_FAILURE;
* }
- * error_code= i18n_ucnv_safe_clone(cnv, &cnv2);
- * if (error_code!= I18N_ERROR_NONE) {
+ * error_code = i18n_ucnv_safe_clone(converter, &cloned_converter);
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ucnv_safe_clone: %d\n", error_code);
- * i18n_ucnv_destroy(cnv);
+ * i18n_ucnv_destroy(converter);
* return EXIT_FAILURE;
* }
- * i18n_ucnv_destroy(cnv);
- * i18n_ucnv_destroy(cnv2);
+ * i18n_ucnv_destroy(converter);
+ * i18n_ucnv_destroy(cloned_converter);
* return EXIT_SUCCESS;
* }
* @endcode
* const char *char_str = "Hello World!";
* const i18n_uchar string[20] = {0,};
* i18n_error_code_e error_code;
- * int32_t len;
+ * int32_t length;
*
- * error_code = i18n_ucalendar_timezone_id_enumeration_create(I18N_UCALENDAR_ZONE_TYPE_ANY, "US", NULL, &enumeration);
- * if (error_code!= I18N_ERROR_NONE) {
- * printf("Error i18n_ucalendar_timezone_id_enumeration_create: %d\n", error_code);
- * return EXIT_FAILURE;
- * }
- *
- * i18n_ustring_from_UTF8((i18n_uchar *)string, I18N_UPRV_LENGTHOF(string), &len, char_str, 5, &error_code);
- * if (error_code!= I18N_ERROR_NONE) {
+ * i18n_ustring_from_UTF8((i18n_uchar *)string, I18N_UPRV_LENGTHOF(string), &length, char_str, 5, &error_code);
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ustring_from_UTF8: %d\n", error_code);
- * i18n_uenumeration_destroy(enumeration);
* return EXIT_FAILURE;
* }
*
* error_code = i18n_uset_create_empty(&excluded_set);
- * if (error_code!= I18N_ERROR_NONE) {
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_uset_create_empty: %d\n", error_code);
- * i18n_uenumeration_destroy(enumeration);
* return EXIT_FAILURE;
* }
*
* error_code = i18n_ucnvsel_create(NULL, 0, excluded_set, I18N_UCNV_ROUNDTRIP_AND_FALLBACK_SET, &sel);
- * if (error_code!= I18N_ERROR_NONE) {
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ucnvsel_create: %d\n", error_code);
- * i18n_uset_destroy(excluded_set);
- * i18n_uenumeration_destroy(enumeration);
+ * i18n_uset_destroy(excluded_set);
* return EXIT_FAILURE;
* }
*
- * error_code = i18n_ucnvsel_select_for_string(sel, string, len, &enumeration);
- * if (error_code!= I18N_ERROR_NONE) {
+ * error_code = i18n_ucnvsel_select_for_string(sel, string, length, &enumeration);
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ucnvsel_select_for_string: %d\n", error_code);
- * i18n_uenumeration_destroy(enumeration);
- * i18n_uset_destroy(excluded_set);
+ * i18n_uset_destroy(excluded_set);
* i18n_ucnvsel_destroy(sel);
* return EXIT_FAILURE;
* }
*
- * i18n_uenumeration_destroy(enumeration);
* i18n_uset_destroy(excluded_set);
* i18n_ucnvsel_destroy(sel);
* return EXIT_SUCCESS;
*
* @code
* #include <stdio.h>
+ * #include <string.h>
* #include <stdlib.h>
* #include <utils_i18n.h>
- * #define I18N_UPRV_LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
*
* int main() {
* i18n_uenumeration_h enumeration = NULL;
* const char *string = "Hello World!";
* i18n_error_code_e error_code;
*
- * error_code = i18n_ucalendar_timezone_id_enumeration_create(I18N_UCALENDAR_ZONE_TYPE_ANY, "US", NULL, &enumeration);
- * if (error_code!= I18N_ERROR_NONE) {
- * printf("Error i18n_ucalendar_timezone_id_enumeration_create: %d\n", error_code);
- * return EXIT_FAILURE;
- * }
- *
* error_code = i18n_uset_create_empty(&excluded_set);
- * if (error_code!= I18N_ERROR_NONE) {
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_uset_create_empty: %d\n", error_code);
* return EXIT_FAILURE;
* }
*
* error_code = i18n_ucnvsel_create(NULL, 0, excluded_set, I18N_UCNV_ROUNDTRIP_AND_FALLBACK_SET, &sel);
- * if (error_code!= I18N_ERROR_NONE) {
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ucnvsel_create: %d\n", error_code);
- * i18n_uset_destroy(excluded_set);
+ * i18n_uset_destroy(excluded_set);
* return EXIT_FAILURE;
* }
*
- * error_code = i18n_ucnvsel_select_for_utf8(sel, string, 5, &enumeration);
- * if (error_code!= I18N_ERROR_NONE) {
+ * error_code = i18n_ucnvsel_select_for_utf8(sel, string, strlen(string), &enumeration);
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ucnvsel_select_for_utf8: %d\n", error_code);
- * i18n_uset_destroy(excluded_set);
+ * i18n_uset_destroy(excluded_set);
* i18n_ucnvsel_destroy(sel);
* return EXIT_FAILURE;
* }
*
- * i18n_uenumeration_destroy(enumeration);
* i18n_uset_destroy(excluded_set);
* i18n_ucnvsel_destroy(sel);
* return EXIT_SUCCESS;
* @code
* #include <stdio.h>
* #include <stdlib.h>
+ * #include <string.h>
* #include <utils_i18n.h>
* int main() {
* i18n_error_code_e error_code;
- * i18n_ucollator_h coll = NULL;
+ * i18n_ucollator_h collator = NULL;
* i18n_uparse_error_s parse_error;
- * i18n_uchar uchar_rules[128];
+ * const char *test_rules = "&9 < a, A < b, B < c, C; ch, cH, Ch, CH < d, D, e, E";
+ * i18n_uchar rules[128];
*
- * i18n_ustring_copy_ua(uchar_rules, rules);
- * error_code = i18n_ucollator_create_rules(uchar_rules, -1, I18N_UCOLLATOR_ON, I18N_UCOLLATOR_DEFAULT_STRENGTH,
- * &parse_error, &coll);
- * if (error_code!= I18N_ERROR_NONE) {
+ * i18n_ustring_copy_ua(rules, test_rules);
+ * error_code = i18n_ucollator_create_rules(rules, strlen(test_rules), I18N_UCOLLATOR_ON, I18N_UCOLLATOR_DEFAULT_STRENGTH,
+ * &parse_error, &collator);
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ucollator_create_rules: %d\n", error_code);
* return EXIT_FAILURE;
* }
- * i18n_ucollator_destroy(coll);
+ * i18n_ucollator_destroy(collator);
* return EXIT_SUCCESS;
* }
* @endcode
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @code
+ * i18n_error_code_e error_code;
* const char *locale = NULL;
* int32_t locale_index = 0;
*
* i18n_ucollator_get_available(locale_index, &locale);
+ * if (error_code != I18N_ERROR_NONE) {
+ * printf("Error i18n_ucollator_get_available: %d\n", error_code);
+ * return EXIT_FAILURE;
+ * }
* @endcode
*/
int i18n_ucollator_get_available(int32_t locale_index, const char **locale);
* i18n_uenumeration_h locales;
*
* error_code = i18n_ucollator_create_available_locales(&locales);
- * if (error_code!= I18N_ERROR_NONE) {
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ucollator_create_available_locales: %d\n", error_code);
* return EXIT_FAILURE;
* }
* i18n_uenumeration_h keywords;
*
* error_code = i18n_ucollator_get_keywords(&keywords);
- * if (error_code!= I18N_ERROR_NONE) {
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ucollator_get_keywords: %d\n", error_code);
* return EXIT_FAILURE;
* }
* #include <utils_i18n.h>
* int main() {
* i18n_error_code_e error_code;
- * i18n_uenumeration_h keyword_values;
+ * i18n_uenumeration_h keyword;
*
- * error_code = i18n_ucollator_get_keyword_values("collation", &keyword_values);
- * if (error_code!= I18N_ERROR_NONE) {
+ * error_code = i18n_ucollator_get_keyword_values("collation", &keyword);
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ucollator_get_keyword_values: %d\n", error_code);
* return EXIT_FAILURE;
* }
- * i18n_uenumeration_destroy(keyword_values);
+ * i18n_uenumeration_destroy(keyword);
* return EXIT_SUCCESS;
* }
* @endcode
* i18n_uenumeration_h keywords;
*
* error_code = i18n_ucollator_get_keyword_values_for_locale("collation", "en_US", false, &keywords);
- * if (error_code!= I18N_ERROR_NONE) {
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ucollator_get_keyword_values_for_locale: %d\n", error_code);
* return EXIT_FAILURE;
* }
* #include <utils_i18n.h>
* int main() {
* i18n_error_code_e error_code;
- * i18n_ucollator_h coll = NULL;
- * i18n_ucollator_h clone_coll = NULL;
+ * i18n_ucollator_h collator = NULL;
+ * i18n_ucollator_h clone = NULL;
*
- * error_code = i18n_ucollator_create("en_US", &coll );
- * if (error_code!= I18N_ERROR_NONE) {
+ * error_code = i18n_ucollator_create("en_US", &collator);
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ucollator_create: %d\n", error_code);
* return EXIT_FAILURE;
* }
- * error_code = i18n_ucollator_safe_clone(coll, &clone_coll);
- * if (error_code!= I18N_ERROR_NONE) {
+ * error_code = i18n_ucollator_safe_clone(collator, &clone);
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_ucollator_safe_clone: %d\n", error_code);
- * i18n_ucollator_destroy(coll);
+ * i18n_ucollator_destroy(collator);
* return EXIT_FAILURE;
* }
- * i18n_ucollator_destroy(coll);
- * i18n_ucollator_destroy(clone_coll);
+ * i18n_ucollator_destroy(clone);
+ * i18n_ucollator_destroy(collator);
* return EXIT_SUCCESS;
* }
* @endcode
* int32_t tz_id_length = -1;
* const i18n_uchar *pattern = NULL;
* int32_t pattern_length = 0;
- * i18n_udate_format_h clone = NULL;
+ * i18n_udate_format_h format_clone = NULL;
*
* error_code = i18n_udate_create(time_style, date_style, locale, tz_id, tz_id_length, pattern, pattern_length, &format);
- * if(I18N_ERROR_NONE != error_code) {
+ * if(error_code != I18N_ERROR_NONE) {
* printf("Error i18n_udate_create: %d\n", error_code);
* return EXIT_FAILURE;
* }
*
- * error_code = i18n_udate_clone(format, &clone);
- * if(I18N_ERROR_NONE != error_code) {
+ * error_code = i18n_udate_clone(format, &format_clone);
+ * if(error_code != I18N_ERROR_NONE) {
* printf("Error i18n_udate_clone : %d\n", error_code);
* i18n_udate_destroy(format);
* return EXIT_FAILURE;
* }
- * i18n_udate_destroy(clone);
+ * i18n_udate_destroy(format_clone);
* i18n_udate_destroy(format);
* return EXIT_SUCCESS;
* }
* i18n_error_code_e error_code;
* i18n_udatepg_h dtpg = NULL;
* error_code = i18n_udatepg_create_empty(&dtpg);
- * if (error_code!= I18N_ERROR_NONE) {
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_udatepg_create_empty: %d\n", error_code);
* return EXIT_FAILURE;
* }
* i18n_udatepg_h dtpg = NULL;
* i18n_udatepg_h dtpg_clone = NULL;
* error_code = i18n_udatepg_create_empty(&dtpg);
- * if (error_code!= I18N_ERROR_NONE) {
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_udatepg_create_empty: %d\n", error_code);
* return EXIT_FAILURE;
* }
* error_code = i18n_udatepg_clone(dtpg, &dtpg_clone);
- * if (error_code!= I18N_ERROR_NONE) {
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_udatepg_clone: %d\n", error_code);
* i18n_udatepg_destroy(dtpg);
* return EXIT_FAILURE;
* }
- * i18n_udatepg_destroy(dtpg);
* i18n_udatepg_destroy(dtpg_clone);
+ * i18n_udatepg_destroy(dtpg);
* return EXIT_SUCCESS;
* }
* @endcode
* int main() {
* i18n_error_code_e error_code;
* i18n_uenumeration_h skeletons = NULL;
- * i18n_udatepg_h dtpg = NULL;
+ * i18n_udatepg_h dtpg = NULL;
* error_code = i18n_udatepg_create_empty(&dtpg);
- * if (error_code!= I18N_ERROR_NONE) {
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_udatepg_create_empty: %d\n", error_code);
* return EXIT_FAILURE;
* }
* error_code = i18n_udatepg_skeletons_create(dtpg, &skeletons);
- * if (error_code!= I18N_ERROR_NONE) {
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_udatepg_skeletons_create: %d\n", error_code);
* i18n_udatepg_destroy(dtpg);
* return EXIT_FAILURE;
* #include <utils_i18n.h>
* int main() {
* i18n_error_code_e error_code;
- * i18n_uenumeration_h skeletons = NULL;
- * i18n_udatepg_h dtpg = NULL;
+ * i18n_uenumeration_h enumeration = NULL;
+ * i18n_udatepg_h dtpg = NULL;
* error_code = i18n_udatepg_create_empty(&dtpg);
- * if (error_code!= I18N_ERROR_NONE) {
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_udatepg_create_empty: %d\n", error_code);
* return EXIT_FAILURE;
* }
- * error_code = i18n_udatepg_base_skeletons_create(dtpg, &skeletons);
- * if (error_code!= I18N_ERROR_NONE) {
+ * error_code = i18n_udatepg_base_skeletons_create(dtpg, &enumeration);
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_udatepg_base_skeletons_create: %d\n", error_code);
* i18n_udatepg_destroy(dtpg);
* return EXIT_FAILURE;
* }
- * i18n_uenumeration_destroy(skeletons);
+ * i18n_uenumeration_destroy(enumeration);
* i18n_udatepg_destroy(dtpg);
* return EXIT_SUCCESS;
* }
* #include <utils_i18n.h>
* int main() {
* i18n_error_code_e error_code;
- * i18n_unumber_format_h num_format = NULL;
- * i18n_unumber_format_h num_format_clone = NULL;
+ * i18n_unumber_format_h fmt = NULL;
+ * i18n_unumber_format_h fmt_clone = NULL;
*
- * error_code = i18n_unumber_create(I18N_UNUMBER_DECIMAL, NULL, -1, I18N_ULOCALE_US, NULL, &num_format);
- * if(I18N_ERROR_NONE != error_code) {
- * printf("Error i18n_unumber_create: %d\n", error_code);
+ * error_code = i18n_unumber_create(I18N_UNUMBER_DECIMAL, NULL, -1, I18N_ULOCALE_US, NULL, &fmt);
+ * if(error_code != I18N_ERROR_NONE) {
+ * printf("Error i18n_unumber_create: %d\n", error_code);
* return EXIT_FAILURE;
- * }
+ * }
*
- * error_code = i18n_unumber_clone(num_format, &num_format_clone);
- * if(I18N_ERROR_NONE != error_code) {
- * printf("Error i18n_unumber_clone: %d\n", error_code);
+ * error_code = i18n_unumber_clone(fmt, &fmt_clone);
+ * if(error_code != I18N_ERROR_NONE) {
+ * printf("Error i18n_unumber_clone: %d\n", error_code);
* return EXIT_FAILURE;
- * }
- * i18n_unumber_destroy(num_format_clone);
- * i18n_unumber_destroy(num_format);
+ * }
+ * i18n_unumber_destroy(fmt_clone);
+ * i18n_unumber_destroy(fmt);
* return EXIT_SUCCESS;
* }
* @endcode
* i18n_unumsys_h unumsys;
* i18n_error_code_e error_code;
* error_code = i18n_unumsys_create("latn", &unumsys);
- * if(I18N_ERROR_NONE != error_code) {
+ * if(error_code != I18N_ERROR_NONE) {
* printf("Error i18n_unumsys_create: %d\n", error_code);
* return EXIT_FAILURE;
* }
* i18n_uset_h uset = NULL;
* i18n_error_code_e error_code;
* error_code = i18n_uset_create_empty(&uset);
- * if (error_code!= I18N_ERROR_NONE) {
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_uset_create_empty: %d\n", error_code);
* return EXIT_FAILURE;
* }
* #include <stdlib.h>
* #include <utils_i18n.h>
* int main() {
- * i18n_uset_h uset = NULL;
+ * i18n_uset_h set = NULL;
* i18n_uchar32 start = 0x41;
* i18n_uchar32 end = 0x50;
*
* i18n_error_code_e error_code;
- * error_code = i18n_uset_create(start, end, &uset);
- * if (error_code!= I18N_ERROR_NONE) {
+ * error_code = i18n_uset_create(start, end, &set);
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_uset_create: %d\n", error_code);
* return EXIT_FAILURE;
* }
- * i18n_uset_destroy(uset);
+ * i18n_uset_destroy(set);
* return EXIT_SUCCESS;
* }
* @endcode
* #include <stdlib.h>
* #include <utils_i18n.h>
* int main() {
- * const char *pattern = "[:Hyphen:]";
- * i18n_uchar *_pattern = NULL;
- * i18n_uset_h uset = NULL;
+ * const char *pattern_ascii = "[:Hyphen:]";
+ * i18n_uchar *pattern = NULL;
+ * i18n_uset_h set = NULL;
* i18n_error_code_e error_code;
*
- * _pattern = (i18n_uchar *)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
- * i18n_ustring_copy_ua(_pattern, pattern);
+ * pattern = (i18n_uchar *)calloc(strlen(pattern_ascii), sizeof(i18n_uchar));
+ * i18n_ustring_copy_ua(pattern, pattern_ascii);
*
- * error_code = i18n_uset_create_pattern(_pattern, 10, &uset);
- * if (error_code!= I18N_ERROR_NONE) {
+ * error_code = i18n_uset_create_pattern(pattern, 10, &set);
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_uset_create_pattern: %d\n", error_code);
* return EXIT_FAILURE;
* }
- * free(_pattern);
- * i18n_uset_destroy(uset);
+ * free(pattern);
+ * i18n_uset_destroy(set);
* return EXIT_SUCCESS;
* }
* @endcode
* #include <stdlib.h>
* #include <utils_i18n.h>
* int main() {
- * const char *pattern = "[:Hyphen:]";
- * i18n_uchar *_pattern = NULL;
- * i18n_uset_h uset = NULL;
+ * const char *pattern_ascii = "[:Hyphen:]";
+ * i18n_uchar *pattern = NULL;
+ * i18n_uset_h set = NULL;
* i18n_error_code_e error_code;
*
- * _pattern = (i18n_uchar *)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
- * i18n_ustring_copy_ua(_pattern, pattern);
+ * pattern = (i18n_uchar *)calloc(strlen(pattern_ascii) + 1, sizeof(i18n_uchar));
+ * i18n_ustring_copy_ua(pattern, pattern_ascii);
*
- * error_code = i18n_uset_create_pattern_options(_pattern, 10, I18N_USET_IGNORE_SPACE, &uset);
- * if (error_code!= I18N_ERROR_NONE) {
+ * error_code = i18n_uset_create_pattern_options(pattern, strlen(pattern_ascii), I18N_USET_IGNORE_SPACE, &set);
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_uset_create_pattern: %d\n", error_code);
* return EXIT_FAILURE;
* }
- * free(_pattern);
- * i18n_uset_destroy(uset);
+ * free(pattern);
+ * i18n_uset_destroy(set);
* return EXIT_SUCCESS;
* }
* @endcode
* #include <stdlib.h>
* #include <utils_i18n.h>
* int main() {
- * i18n_uset_h uset = NULL;
- * i18n_uset_h uset_c = NULL;
+ * i18n_uset_h set = NULL;
+ * i18n_uset_h set_clone = NULL;
* i18n_uchar32 start = 0x41;
* i18n_uchar32 end = 0x50;
* i18n_error_code_e error_code;
*
- * error_code = i18n_uset_create(start, end, &uset);
- * if (error_code!= I18N_ERROR_NONE) {
+ * error_code = i18n_uset_create(start, end, &set);
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_uset_create: %d\n", error_code);
* return EXIT_FAILURE;
* }
- * error_code = i18n_uset_clone(uset, &uset_c);
- * if (error_code!= I18N_ERROR_NONE) {
+ * error_code = i18n_uset_clone(set, &set_clone);
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_uset_clone: %d\n", error_code);
- * i18n_uset_destroy(uset);
+ * i18n_uset_destroy(set);
* return EXIT_FAILURE;
* }
- * i18n_uset_destroy(uset);
- * i18n_uset_destroy(uset_c);
+ * i18n_uset_destroy(set_clone);
+ * i18n_uset_destroy(set);
* return EXIT_SUCCESS;
* }
* @endcode
* #include <stdlib.h>
* #include <utils_i18n.h>
* int main() {
- * i18n_uset_h uset = NULL;
- * i18n_uset_h uset_c = NULL;
+ * i18n_uset_h set = NULL;
+ * i18n_uset_h set_clone = NULL;
* i18n_uchar32 start = 0x41;
* i18n_uchar32 end = 0x50;
* i18n_error_code_e error_code;
*
- * error_code = i18n_uset_create(start, end, &uset);
- * if (error_code!= I18N_ERROR_NONE) {
+ * error_code = i18n_uset_create(start, end, &set);
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_uset_create: %d\n", error_code);
* return EXIT_FAILURE;
* }
- * error_code = i18n_uset_clone_as_thawed(uset, &uset_c);
- * if (error_code!= I18N_ERROR_NONE) {
+ * error_code = i18n_uset_clone_as_thawed(set, &set_clone);
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_uset_clone_as_thawed: %d\n", error_code);
- * i18n_uset_destroy(uset);
+ * i18n_uset_destroy(set);
* return EXIT_FAILURE;
* }
- * i18n_uset_destroy(uset);
- * i18n_uset_destroy(uset_c);
+ * i18n_uset_destroy(set);
+ * i18n_uset_destroy(set_clone);
* return EXIT_SUCCESS;
* }
* @endcode
* i18n_error_code_e error_code;
* i18n_uchar uString[] = {0x41, 0x42, 0x43, 0};
* error_code = i18n_utext_create_for_uchars(NULL, uString, -1, &utb);
- * if (error_code!= I18N_ERROR_NONE) {
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_uset_create: %d\n", error_code);
* return EXIT_FAILURE;
* }