} while (0)
#define retex_if(expr, val, fmt, arg...) do { \
- if(expr) { \
+ if (expr) { \
ERR(fmt, ##arg); \
val; \
goto CATCH; \
#define ERR_MAPPING(ICU_ERROR, BASE_UTILS_ERROR) BASE_UTILS_ERROR = \
(i18n_error_code_e)_i18n_error_mapping((int)ICU_ERROR)
-int _i18n_error_mapping ( int err );
-int _i18n_error_mapping_reverse ( int err );
+int _i18n_error_mapping(int err);
+int _i18n_error_mapping_reverse(int err);
#ifdef __cplusplus
}
* @see i18n_timezone_create()
* @see i18n_timezone_create_gmt()
*/
-int i18n_timezone_create_unknown ( i18n_timezone_h *timezone );
+int i18n_timezone_create_unknown(i18n_timezone_h *timezone);
/**
* @brief The GMT (=UTC) time zone has a raw offset of zero and does not use daylight savings time.
* @retval #I18N_ERROR_NONE Successful
* @see i18n_timezone_create_unknown()
*/
-int i18n_timezone_create_gmt ( i18n_timezone_h *timezone );
+int i18n_timezone_create_gmt(i18n_timezone_h *timezone);
/**
* @brief Creates an i18n_timezone_h for the given timezone_id.
*
* @retval #I18N_ERROR_NONE Successful
*/
-int i18n_timezone_create ( i18n_timezone_h *timezone, const char *timezone_id );
+int i18n_timezone_create(i18n_timezone_h *timezone, const char *timezone_id);
/**
* @brief Destroys an i18n_timezone_h.
*
* @retval #I18N_ERROR_NONE Successful
*/
-int i18n_timezone_create_default ( i18n_timezone_h *timezone );
+int i18n_timezone_create_default(i18n_timezone_h *timezone);
/**
* @brief Sets the default time zone (i.e., what's returned by #i18n_timezone_create_default()) to be the specified time zone.
*
* @retval #I18N_ERROR_NONE Successful
*/
-int i18n_timezone_set_default( i18n_timezone_h timezone );
+int i18n_timezone_set_default(i18n_timezone_h timezone);
/**
* @brief Returns the timezone data version currently used by I18N.
#if !defined(U_WCHAR_IS_UTF16) && !defined(U_WCHAR_IS_UTF32)
# ifdef __STDC_ISO_10646__
-# if (U_SIZEOF_WCHAR_T==2)
+# if (U_SIZEOF_WCHAR_T == 2)
# define U_WCHAR_IS_UTF16
-# elif (U_SIZEOF_WCHAR_T==4)
+# elif (U_SIZEOF_WCHAR_T == 4)
# define U_WCHAR_IS_UTF32
# endif
# elif defined __UCS2__
-# if (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <= U_PF_OS400) && (U_SIZEOF_WCHAR_T==2)
+# if (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <= U_PF_OS400) && (U_SIZEOF_WCHAR_T == 2)
# define U_WCHAR_IS_UTF16
# endif
# elif defined(__UCS4__) || (U_PLATFORM == U_PF_OS400 && defined(__UTF32__))
-# if (U_SIZEOF_WCHAR_T==4)
+# if (U_SIZEOF_WCHAR_T == 4)
# define U_WCHAR_IS_UTF32
# endif
-# elif U_PLATFORM_IS_DARWIN_BASED || (U_SIZEOF_WCHAR_T==4 && U_PLATFORM_IS_LINUX_BASED)
+# elif U_PLATFORM_IS_DARWIN_BASED || (U_SIZEOF_WCHAR_T == 4 && U_PLATFORM_IS_LINUX_BASED)
# define U_WCHAR_IS_UTF32
# elif U_PLATFORM_HAS_WIN32_API
# define U_WCHAR_IS_UTF16
typedef UCHAR_TYPE i18n_uchar;
/* Not #elif U_HAVE_CHAR16_T -- because that is type-incompatible with pre-C++11 callers
typedef char16_t i18n_uchar; */
-#elif U_SIZEOF_WCHAR_T==2
+#elif U_SIZEOF_WCHAR_T == 2
typedef wchar_t i18n_uchar;
#elif defined(__CHAR16_TYPE__)
typedef __CHAR16_TYPE__ i18n_uchar;
* @brief Handle to struct representing a range of text containing a specific field.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef i18n_ufield_position_s* i18n_ufield_position_h;
+typedef i18n_ufield_position_s *18n_ufield_position_h;
/**
* @brief Enumeration for the possible date/time format styles.
* @since_tizen 2.3.1
*/
-typedef enum{
+typedef enum {
I18N_UDISPCTX_TYPE_DIALECT_HANDLING, /**<Type to retrieve the dialect handling setting, e.g. UDISPCTX_STANDARD_NAMES or UDISPCTX_DIALECT_NAMES. */
I18N_UDISPCTX_TYPE_CAPITALIZATION, /**<Type to retrieve the capitalization context setting, e.g. UDISPCTX_CAPITALIZATION_NONE, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE, UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, etc. */
#ifndef U_HIDE_DRAFT_API
*
* @see i18n_ustring_unescape_at()
*/
-typedef i18n_uchar(* i18n_ustring_unescape_char_at_cb)(int32_t offset, void *context);
+typedef i18n_uchar(*i18n_ustring_unescape_char_at_cb)(int32_t offset, void *context);
/**
* @brief Option value for case folding: use default mappings defined in CaseFolding.txt.
I18N_TIMEZONE_DISPLAY_TYPE_LONG_GMT, /**< Selector for long display name derived from time zone offset */
I18N_TIMEZONE_DISPLAY_TYPE_SHORT_COMMONLY_USED, /**< Selector for short display name derived from the time zone's fallback name */
I18N_TIMEZONE_DISPLAY_TYPE_GENERIC_LOCATION /**< Selector for long display name derived from the time zone's fallback name */
-}i18n_timezone_display_type_e;
+} i18n_timezone_display_type_e;
/**
* @}
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ubrk_create_rules()
*/
-int i18n_ubrk_create (i18n_ubreak_iterator_type_e type, const char *locale, const i18n_uchar *text, int32_t text_length, i18n_ubreak_iterator_h *break_iter);
+int i18n_ubrk_create(i18n_ubreak_iterator_type_e type, const char *locale, const i18n_uchar *text, int32_t text_length, i18n_ubreak_iterator_h *break_iter);
/**
* @brief Opens a new #i18n_ubreak_iterator_h for locating text boundaries using specified breaking rules.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ubrk_create()
*/
-int i18n_ubrk_create_rules (const i18n_uchar *rules, int32_t rules_length, const i18n_uchar *text, int32_t text_length, i18n_ubreak_iterator_h *break_iter, i18n_uparse_error_s *parse_err);
+int i18n_ubrk_create_rules(const i18n_uchar *rules, int32_t rules_length, const i18n_uchar *text, int32_t text_length, i18n_ubreak_iterator_h *break_iter, i18n_uparse_error_s *parse_err);
/**
* @brief Thread safe cloning operation.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ubrk_safe_clone (const i18n_ubreak_iterator_h break_iter, void *stack_buffer, int32_t *p_buffer_size, i18n_ubreak_iterator_h *break_iter_clone);
+int i18n_ubrk_safe_clone(const i18n_ubreak_iterator_h break_iter, void *stack_buffer, int32_t *p_buffer_size, i18n_ubreak_iterator_h *break_iter_clone);
/**
* @brief Closes a #i18n_ubreak_iterator_h.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ubrk_destroy (i18n_ubreak_iterator_h break_iter);
+int i18n_ubrk_destroy(i18n_ubreak_iterator_h break_iter);
/**
* @brief Sets an existing iterator to point to a new piece of text.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ubrk_set_text (i18n_ubreak_iterator_h break_iter, const i18n_uchar *text, int32_t text_length);
+int i18n_ubrk_set_text(i18n_ubreak_iterator_h break_iter, const i18n_uchar *text, int32_t text_length);
/**
* @brief Determines the most recently-returned text boundary.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ubrk_current (const i18n_ubreak_iterator_h break_iter);
+int32_t i18n_ubrk_current(const i18n_ubreak_iterator_h break_iter);
/**
* @brief Advances the iterator to the boundary following the current boundary.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ubrk_previous()
*/
-int32_t i18n_ubrk_next (i18n_ubreak_iterator_h break_iter);
+int32_t i18n_ubrk_next(i18n_ubreak_iterator_h break_iter);
/**
* @brief Sets the iterator position to the boundary preceding the current boundary.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ubrk_next()
*/
-int32_t i18n_ubrk_previous (i18n_ubreak_iterator_h break_iter);
+int32_t i18n_ubrk_previous(i18n_ubreak_iterator_h break_iter);
/**
* @brief Sets the iterator position to zero, the start of the text being scanned.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ubrk_last()
*/
-int32_t i18n_ubrk_first (i18n_ubreak_iterator_h break_iter);
+int32_t i18n_ubrk_first(i18n_ubreak_iterator_h break_iter);
/**
* @brief Sets the iterator position to the index immediately <EM>beyond</EM> the last character in the text being scanned.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ubrk_first()
*/
-int32_t i18n_ubrk_last (i18n_ubreak_iterator_h break_iter);
+int32_t i18n_ubrk_last(i18n_ubreak_iterator_h break_iter);
/**
* @brief Sets the iterator position to the first boundary preceding the specified @c offset.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ubrk_following()
*/
-int32_t i18n_ubrk_preceding (i18n_ubreak_iterator_h break_iter, int32_t offset);
+int32_t i18n_ubrk_preceding(i18n_ubreak_iterator_h break_iter, int32_t offset);
/**
* @brief Advances the iterator to the first boundary following the specified @c offset.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ubrk_preceding()
*/
-int32_t i18n_ubrk_following (i18n_ubreak_iterator_h break_iter, int32_t offset);
+int32_t i18n_ubrk_following(i18n_ubreak_iterator_h break_iter, int32_t offset);
/**
* @brief Gets a locale for which text breaking information is available.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ubrk_count_available()
*/
-const char *i18n_ubrk_get_available (int32_t index);
+const char *i18n_ubrk_get_available(int32_t index);
/**
* @brief Determines how many locales have text breaking information available.
* @exception #I18N_ERROR_NONE Successful
* @see i18n_ubrk_get_available()
*/
-int32_t i18n_ubrk_count_available (void);
+int32_t i18n_ubrk_count_available(void);
/**
* @brief Returns true if the specfied position is a boundary position.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_ubrk_is_boundary (i18n_ubreak_iterator_h break_iter, int32_t offset);
+i18n_ubool i18n_ubrk_is_boundary(i18n_ubreak_iterator_h break_iter, int32_t offset);
/**
* @brief Returns the status from the break rule that determined the most recently
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ubrk_get_rule_status (i18n_ubreak_iterator_h break_iter);
+int32_t i18n_ubrk_get_rule_status(i18n_ubreak_iterator_h break_iter);
/**
* @brief Gets the statuses from the break rules that determined the most recently
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ubrk_get_rule_status_vec (i18n_ubreak_iterator_h break_iter, int32_t *fill_in_vec, int32_t capacity);
+int32_t i18n_ubrk_get_rule_status_vec(i18n_ubreak_iterator_h break_iter, int32_t *fill_in_vec, int32_t capacity);
/**
* @brief Returns the locale of the break iterator. You can choose between the valid and
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-const char *i18n_ubrk_get_locale_by_type (const i18n_ubreak_iterator_h break_iter, i18n_ulocale_data_locale_type_e type);
+const char *i18n_ubrk_get_locale_by_type(const i18n_ubreak_iterator_h break_iter, i18n_ulocale_data_locale_type_e type);
#ifdef __cplusplus
}
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_set_default_timezone ( const i18n_uchar *zone_id );
+int i18n_ucalendar_set_default_timezone(const i18n_uchar *zone_id);
/**
* @brief Gets the current date and time.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_get_now ( i18n_udate *date );
+int i18n_ucalendar_get_now(i18n_udate *date);
/**
* @brief Creates an #i18n_ucalendar_h.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory
*/
-int i18n_ucalendar_create ( const i18n_uchar *zone_id, int32_t len, const char *locale, i18n_ucalendar_type_e type, i18n_ucalendar_h *calendar );
+int i18n_ucalendar_create(const i18n_uchar *zone_id, int32_t len, const char *locale, i18n_ucalendar_type_e type, i18n_ucalendar_h *calendar);
/**
* @brief Destroys an #i18n_ucalendar_h.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_destroy ( i18n_ucalendar_h calendar );
+int i18n_ucalendar_destroy(i18n_ucalendar_h calendar);
/**
* @brief Creates a copy of a #i18n_ucalendar_h.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_clone ( const i18n_ucalendar_h cal, i18n_ucalendar_h *identical_to_cal );
+int i18n_ucalendar_clone(const i18n_ucalendar_h cal, i18n_ucalendar_h *identical_to_cal);
/**
* @brief Gets the display name for a calendar's TimeZone.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_get_timezone_displayname ( const i18n_ucalendar_h calendar, i18n_ucalendar_displayname_type_e type, const char *locale, i18n_uchar *result, int32_t result_len, int32_t *buf_size_needed );
+int i18n_ucalendar_get_timezone_displayname(const i18n_ucalendar_h calendar, i18n_ucalendar_displayname_type_e type, const char *locale, i18n_uchar *result, int32_t result_len, int32_t *buf_size_needed);
/**
* @brief Determines if an #i18n_ucalendar_h is currently in daylight savings time.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_is_in_daylight_time ( const i18n_ucalendar_h calendar, i18n_ubool *is_in );
+int i18n_ucalendar_is_in_daylight_time(const i18n_ucalendar_h calendar, i18n_ubool *is_in);
/**
* @brief Sets the value of a field in a #i18n_ucalendar_h.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_set ( i18n_ucalendar_h cal, i18n_ucalendar_date_fields_e field, int32_t val );
+int i18n_ucalendar_set(i18n_ucalendar_h cal, i18n_ucalendar_date_fields_e field, int32_t val);
/**
* @brief Sets a numeric attribute associated with an #i18n_ucalendar_h.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_set_attribute ( i18n_ucalendar_h calendar, i18n_ucalendar_attribute_e attr, int32_t val );
+int i18n_ucalendar_set_attribute(i18n_ucalendar_h calendar, i18n_ucalendar_attribute_e attr, int32_t val);
/**
* @brief Gets a numeric attribute associated with an i18n_ucalendar.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_get_attribute ( i18n_ucalendar_h calendar, i18n_ucalendar_attribute_e attr, int32_t *val);
+int i18n_ucalendar_get_attribute(i18n_ucalendar_h calendar, i18n_ucalendar_attribute_e attr, int32_t *val);
/**
* @brief Gets a calendar's current time in milliseconds.
* @see i18n_ucalendar_set_milliseconds()
* @see i18n_ucalendar_set_date_time()
*/
-int i18n_ucalendar_get_milliseconds( const i18n_ucalendar_h calendar, i18n_udate *date );
+int i18n_ucalendar_get_milliseconds(const i18n_ucalendar_h calendar, i18n_udate *date);
/**
* @brief Sets a calendar's current time in milliseconds.
* @see i18n_ucalendar_get_milliseconds()
* @see i18n_ucalendar_set_date_time()
*/
-int i18n_ucalendar_set_milliseconds ( i18n_ucalendar_h calendar, i18n_udate milliseconds );
+int i18n_ucalendar_set_milliseconds(i18n_ucalendar_h calendar, i18n_udate milliseconds);
/**
* @brief Sets a calendar's current date.
* @see i18n_ucalendar_get_milliseconds()
* @see i18n_ucalendar_set_milliseconds()
*/
-int i18n_ucalendar_set_date_time ( i18n_ucalendar_h calendar, int32_t year, int32_t month, int32_t date, int32_t hour, int32_t min, int32_t sec );
+int i18n_ucalendar_set_date_time(i18n_ucalendar_h calendar, int32_t year, int32_t month, int32_t date, int32_t hour, int32_t min, int32_t sec);
/**
* @brief Returns @c true if two #i18n_ucalendar_h calendars are equivalent.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_is_equivalent_to ( const i18n_ucalendar_h calendar1, const i18n_ucalendar_h calendar2, i18n_ubool *equiv );
+int i18n_ucalendar_is_equivalent_to(const i18n_ucalendar_h calendar1, const i18n_ucalendar_h calendar2, i18n_ubool *equiv);
/**
* @brief Adds a specified signed amount to a particular field in a #i18n_ucalendar_h.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_add ( i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t amount );
+int i18n_ucalendar_add(i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t amount);
/**
* @brief Gets the current value of a field from an #i18n_ucalendar_h.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_get ( const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t *val );
+int i18n_ucalendar_get(const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t *val);
// Newly Added APIs
*
* @return The date difference for the specified field.
*/
-int32_t i18n_ucalendar_get_field_difference ( i18n_ucalendar_h calendar, i18n_udate target, i18n_ucalendar_date_fields_e field, i18n_error_code_e *status );
+int32_t i18n_ucalendar_get_field_difference(i18n_ucalendar_h calendar, i18n_udate target, i18n_ucalendar_date_fields_e field, i18n_error_code_e *status);
/**
* @brief Creates an enumeration over system time zone IDs with the given filter conditions.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_timezone_id_enumeration_create ( i18n_system_timezone_type_e zone_type, const char *region, const int32_t *raw_offset, i18n_uenumeration_h *enumeration);
+int i18n_ucalendar_timezone_id_enumeration_create(i18n_system_timezone_type_e zone_type, const char *region, const int32_t *raw_offset, i18n_uenumeration_h *enumeration);
/**
* @brief Creates an enumeration over all time zones.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_timezones_create (i18n_uenumeration_h * enumeration);
+int i18n_ucalendar_timezones_create(i18n_uenumeration_h * enumeration);
/**
* @brief Creates an enumeration over all time zones associated with the given country.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_country_timezones_create (const char *country, i18n_uenumeration_h * enumeration);
+int i18n_ucalendar_country_timezones_create(const char *country, i18n_uenumeration_h * enumeration);
/**
* @brief Returns the default time zone.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid parameter
*/
-int32_t i18n_ucalendar_get_default_timezone (i18n_uchar *result, int32_t result_capacity);
+int32_t i18n_ucalendar_get_default_timezone(i18n_uchar *result, int32_t result_capacity);
/**
* @brief Sets the TimeZone used by a #i18n_ucalendar_h.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_set_timezone ( i18n_ucalendar_h calendar, const i18n_uchar *zone_id, int32_t length );
+int i18n_ucalendar_set_timezone(i18n_ucalendar_h calendar, const i18n_uchar *zone_id, int32_t length);
/**
* @brief Gets the ID of the calendar's time zone.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ucalendar_get_timezone_id (const i18n_ucalendar_h calendar, i18n_uchar *result, int32_t result_length);
+int32_t i18n_ucalendar_get_timezone_id(const i18n_ucalendar_h calendar, i18n_uchar *result, int32_t result_length);
/**
* @brief Sets the Gregorian Calendar change date.
*
* @see i18n_ucalendar_get_gregorian_change()
*/
-int i18n_ucalendar_set_gregorian_change ( i18n_ucalendar_h calendar, i18n_udate date);
+int i18n_ucalendar_set_gregorian_change(i18n_ucalendar_h calendar, i18n_udate date);
/**
* @brief Gets the Gregorian Calendar change date.
*
* @see i18n_ucalendar_set_gregorian_change()
*/
-int i18n_ucalendar_get_gregorian_change (const i18n_ucalendar_h calendar, i18n_udate *date);
+int i18n_ucalendar_get_gregorian_change(const i18n_ucalendar_h calendar, i18n_udate *date);
/**
* @brief Gets a locale for which calendars are available.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid parameter
* @see i18n_ucalendar_count_available()
*/
-const char * i18n_ucalendar_get_available (int32_t locale_index);
+const char * i18n_ucalendar_get_available(int32_t locale_index);
/**
* @brief Determines how many locales have calendars available.
* @exception #I18N_ERROR_NONE Successful
* @see i18n_ucalendar_get_available()
*/
-int32_t i18n_ucalendar_count_available (void);
+int32_t i18n_ucalendar_count_available(void);
/**
* @brief Sets a calendar's current date.
* @see i18n_ucalendar_set_milliseconds()
* @see i18n_ucalendar_set_date_time()
*/
-int i18n_ucalendar_set_date (i18n_ucalendar_h calendar, int32_t year, int32_t month, int32_t date);
+int i18n_ucalendar_set_date(i18n_ucalendar_h calendar, int32_t year, int32_t month, int32_t date);
/**
* @brief Adds a specified signed amount to a particular field in a #i18n_ucalendar_h.
* @remarks #I18N_UCALENDAR_ZONE_OFFSET and #I18N_UCALENDAR_DST_OFFSET are not supported by this function.
* @see i18n_ucalendar_add()
*/
-int i18n_ucalendar_roll (i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t amount);
+int i18n_ucalendar_roll(i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t amount);
/**
* @brief Determines if a field in a #i18n_ucalendar_h is set.
* @see i18n_ucalendar_clear()
*
*/
-i18n_ubool i18n_ucalendar_is_set (const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field);
+i18n_ubool i18n_ucalendar_is_set(const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field);
/**
* @brief Clears a field in a #i18n_ucalendar_h.
* @see i18n_ucalendar_clear()
*
*/
-int i18n_ucalendar_clear_field (i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field);
+int i18n_ucalendar_clear_field(i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field);
/**
* @brief Clears all fields in a #i18n_ucalendar_h.
* @see i18n_ucalendar_clear_field()
*
*/
-int i18n_ucalendar_clear (i18n_ucalendar_h calendar);
+int i18n_ucalendar_clear(i18n_ucalendar_h calendar);
/**
* @brief Determines a limit for a field in an #i18n_ucalendar_h.
*
* @return The requested value.
*/
-int32_t i18n_ucalendar_get_limit (const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, i18n_ucalendar_limit_type_e type);
+int32_t i18n_ucalendar_get_limit(const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, i18n_ucalendar_limit_type_e type);
/**
* @brief Gets the locale for this @c calendar object.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-const char *i18n_ucalendar_get_locale_by_type (const i18n_ucalendar_h calendar, i18n_ulocale_data_locale_type_e type);
+const char *i18n_ucalendar_get_locale_by_type(const i18n_ucalendar_h calendar, i18n_ulocale_data_locale_type_e type);
/**
* @brief Returns the timezone data version currently used by ICU.
* @return The version string, such as "2007f".
* @exception #I18N_ERROR_NONE Successful
*/
-const char *i18n_ucalendar_get_tz_data_version (void);
+const char *i18n_ucalendar_get_tz_data_version(void);
/**
* @brief Returns the canonical system timezone ID or the normalized custom time zone ID for the given time zone ID.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ucalendar_get_canonical_timezone_id (const i18n_uchar *id, int32_t length, i18n_uchar *result, int32_t result_capacity, i18n_ubool *is_system_id);
+int32_t i18n_ucalendar_get_canonical_timezone_id(const i18n_uchar *id, int32_t length, i18n_uchar *result, int32_t result_capacity, i18n_ubool *is_system_id);
/**
* @brief Gets the resource keyword value string designating the calendar type for the #i18n_ucalendar_h.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-const char *i18n_ucalendar_get_type (const i18n_ucalendar_h calendar);
+const char *i18n_ucalendar_get_type(const i18n_ucalendar_h calendar);
/**
* @brief Given a key and a locale, returns an array of string values in a preferred order that would make a difference.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_get_keyword_values_for_locale (const char *key, const char *locale, i18n_ubool commonly_used, i18n_uenumeration_h *enumeration);
+int i18n_ucalendar_get_keyword_values_for_locale(const char *key, const char *locale, i18n_ubool commonly_used, i18n_uenumeration_h *enumeration);
/**
* @brief Returns whether the given day of the week is a weekday, a weekend day,
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_get_day_of_week_type (const i18n_ucalendar_h calendar, i18n_ucalendar_days_of_week_e day_of_week, i18n_ucalendar_weekday_type_e *weekday);
+int i18n_ucalendar_get_day_of_week_type(const i18n_ucalendar_h calendar, i18n_ucalendar_days_of_week_e day_of_week, i18n_ucalendar_weekday_type_e *weekday);
/**
* @brief Returns the time during the day at which the weekend begins or ends in this calendar system.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ucalendar_get_weekend_transition (const i18n_ucalendar_h calendar, i18n_ucalendar_days_of_week_e day_of_week);
+int32_t i18n_ucalendar_get_weekend_transition(const i18n_ucalendar_h calendar, i18n_ucalendar_days_of_week_e day_of_week);
/**
* @brief Returns @c true if the given #i18n_udate is in the weekend in this calendar system.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_ucalendar_is_weekend (i18n_ucalendar_h calendar, i18n_udate date);
+i18n_ubool i18n_ucalendar_is_weekend(i18n_ucalendar_h calendar, i18n_udate date);
/**
* @brief Get the #i18n_udate for the next/previous time zone transition relative
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_ucalendar_get_timezone_transition_date (const i18n_ucalendar_h calendar, i18n_utimezone_transition_type_e type, i18n_udate *transition);
+i18n_ubool i18n_ucalendar_get_timezone_transition_date(const i18n_ucalendar_h calendar, i18n_utimezone_transition_type_e type, i18n_udate *transition);
/**
* @}
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uchar_get_int_property_value ( i18n_uchar32 c, i18n_uchar_uproperty_e which, int32_t *property_val );
+int i18n_uchar_get_int_property_value(i18n_uchar32 c, i18n_uchar_uproperty_e which, int32_t *property_val);
/**
* @brief Gets the Unicode allocation block that contains the character.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uchar_get_ublock_code ( i18n_uchar32 c, i18n_uchar_ublock_code_e *block_val );
+int i18n_uchar_get_ublock_code(i18n_uchar32 c, i18n_uchar_ublock_code_e *block_val);
#ifdef __cplusplus
}
int ret = I18N_ERROR_NONE;
int buf_01_len = 0, buf_02_len = 0;
- for ( i = 0; i < sizeof( src ) / sizeof( src[0] ); i++ ) {
- dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i] );
+ for (i = 0; i < sizeof(src) / sizeof(src[0]); i++) {
+ dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i]);
} // cat banana airplane
// creates a collator
- ret = i18n_ucollator_create( "en_US", &coll );
+ ret = i18n_ucollator_create("en_US", &coll);
// compares and sorts in ascending order
- if ( ret == I18N_ERROR_NONE ) {
+ if (ret == I18N_ERROR_NONE) {
i18n_ucollator_set_strength( coll, I18N_UCOLLATOR_TERTIARY );
- for ( i = 0; i < 2; i++ ) {
- for ( j = 0; j < 2 - i; j++ ) {
- i18n_ustring_copy_ua( buf_01, src[j] );
- i18n_ustring_copy_ua( buf_02, src[j+1] );
- i18n_ustring_get_length( buf_01, &buf_01_len );
- i18n_ustring_get_length( buf_02, &buf_02_len );
+ for (i = 0; i < 2; i++) {
+ for (j = 0; j < 2 - i; j++) {
+ i18n_ustring_copy_ua(buf_01, src[j]);
+ i18n_ustring_copy_ua(buf_02, src[j+1]);
+ i18n_ustring_get_length(buf_01, &buf_01_len);
+ i18n_ustring_get_length(buf_02, &buf_02_len);
// compares buf_01 with buf_02
- i18n_ucollator_str_collator( coll, buf_01, buf_01_len, buf_02, buf_02_len, &result );
- if ( result == I18N_UCOLLATOR_GREATER ) {
+ i18n_ucollator_str_collator(coll, buf_01, buf_01_len, buf_02, buf_02_len, &result);
+ if (result == I18N_UCOLLATOR_GREATER) {
tmp = src[j];
src[j] = src[j+1];
src[j+1] = tmp;
// destroys the collator
i18n_ucollator_destroy( coll ); // deallocate memory for collator
- for ( i = 0; i < sizeof( src ) / sizeof( src[0] ); i++ ) {
+ for (i = 0; i < sizeof(src) / sizeof(src[0]); i++) {
dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i] );
} // ariplane banana cat
* @endcode
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ucollator_destroy()
*/
-int i18n_ucollator_create ( const char *locale, i18n_ucollator_h *collator );
+int i18n_ucollator_create(const char *locale, i18n_ucollator_h *collator);
/**
* @brief Closes a i18n_ucollator_h.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ucollator_create()
*/
-int i18n_ucollator_destroy ( i18n_ucollator_h collator );
+int i18n_ucollator_destroy(i18n_ucollator_h collator);
/**
* @brief Compares two strings.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ucollator_equal()
*/
-int i18n_ucollator_str_collator ( const i18n_ucollator_h collator, const i18n_uchar *src, int32_t src_len, const i18n_uchar *target, int32_t target_len, i18n_ucollator_result_e *result );
+int i18n_ucollator_str_collator(const i18n_ucollator_h collator, const i18n_uchar *src, int32_t src_len, const i18n_uchar *target, int32_t target_len, i18n_ucollator_result_e *result);
/**
* @brief Compares two strings for equality.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ucollator_str_collator()
*/
-int i18n_ucollator_equal ( const i18n_ucollator_h collator, const i18n_uchar *src, int32_t src_len, const i18n_uchar *target, int32_t target_len, i18n_ubool *equal );
+int i18n_ucollator_equal(const i18n_ucollator_h collator, const i18n_uchar *src, int32_t src_len, const i18n_uchar *target, int32_t target_len, i18n_ubool *equal);
/**
* @brief Sets the collation strength used in a collator.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucollator_set_strength ( i18n_ucollator_h collator, i18n_ucollator_strength_e strength );
+int i18n_ucollator_set_strength(i18n_ucollator_h collator, i18n_ucollator_strength_e strength);
/**
* @brief Sets a universal attribute setter.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucollator_set_attribute ( i18n_ucollator_h collator, i18n_ucollator_attribute_e attr, i18n_ucollator_attribute_value_e val );
+int i18n_ucollator_set_attribute(i18n_ucollator_h collator, i18n_ucollator_attribute_e attr, i18n_ucollator_attribute_value_e val);
#ifdef __cplusplus
}
// creates new i18n_udate_format_h to format dates and times
ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_KR, -1, bestPattern, -1, &formatter_KR);
- if ( ret != I18N_ERROR_NONE ) {
+ if (ret != I18N_ERROR_NONE) {
dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n");
}
if (!formatter_KR) {
dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n");
}
ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_LA, -1, bestPattern, -1, &formatter_LA);
- if ( ret != I18N_ERROR_NONE ) {
+ if (ret != I18N_ERROR_NONE) {
dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n");
}
if (!formatter_LA) {
dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n");
}
ret = i18n_udate_create(I18N_UDATE_PATTERN , I18N_UDATE_PATTERN , locale, utf16_timezone_SaoPaulo, -1, bestPattern, -1, &formatter_SaoPaulo);
- if ( ret != I18N_ERROR_NONE ) {
+ if (ret != I18N_ERROR_NONE) {
dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n");
}
if (!formatter_LA) {
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udate_create ( i18n_udate_format_style_e time_style, i18n_udate_format_style_e date_style, const char *locale, const i18n_uchar *tz_id, int32_t tz_id_len, const i18n_uchar *pattern, int pattern_len, i18n_udate_format_h *format );
+int i18n_udate_create(i18n_udate_format_style_e time_style, i18n_udate_format_style_e date_style, const char *locale, const i18n_uchar *tz_id, int32_t tz_id_len, const i18n_uchar *pattern, int pattern_len, i18n_udate_format_h *format);
/**
* @brief Destroys an #i18n_udate_format_h.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udate_destroy ( i18n_udate_format_h format );
+int i18n_udate_destroy(i18n_udate_format_h format);
/**
* @brief Formats a date using an #i18n_udate_format_h.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udate_format_date ( const i18n_udate_format_h format, i18n_udate date_to_format, i18n_uchar *result, int32_t result_len, i18n_ufield_position_h pos, int32_t *buf_size_needed );
+int i18n_udate_format_date(const i18n_udate_format_h format, i18n_udate date_to_format, i18n_uchar *result, int32_t result_len, i18n_ufield_position_h pos, int32_t *buf_size_needed);
// Newly Added APIs
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udate_to_calendar_date_field ( i18n_udate_format_field_e field, i18n_ucalendar_date_fields_e *date_field_type );
+int i18n_udate_to_calendar_date_field(i18n_udate_format_field_e field, i18n_ucalendar_date_fields_e *date_field_type);
/**
* @brief Creates a copy of an #i18n_udate_format_h.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udate_clone ( const i18n_udate_format_h format, i18n_udate_format_h *format_clone );
+int i18n_udate_clone(const i18n_udate_format_h format, i18n_udate_format_h *format_clone);
/**
* @brief Parses a string into an date/time using an #i18n_udate_format_h.
*
* @see i18n_udate_format_date()
*/
-int i18n_udate_parse ( const i18n_udate_format_h format, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, i18n_udate *parsed_date );
+int i18n_udate_parse(const i18n_udate_format_h format, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, i18n_udate *parsed_date);
/**
* @brief Parses a string into an date/time using an #i18n_udate_format_h.
*
* @see i18n_udate_format_date()
*/
-int i18n_udate_parse_calendar (const i18n_udate_format_h format, i18n_ucalendar_h *calendar, const i18n_uchar *text,
- int32_t text_length, int32_t *parse_pos );
+int i18n_udate_parse_calendar(const i18n_udate_format_h format, i18n_ucalendar_h *calendar, const i18n_uchar *text,
+ int32_t text_length, int32_t *parse_pos);
/**
* @brief Determines if an #i18n_udate_format_h will perform lenient parsing.
*
* @see i18n_udate_set_lenient()
*/
-i18n_ubool i18n_udate_is_lenient ( const i18n_udate_format_h format );
+i18n_ubool i18n_udate_is_lenient(const i18n_udate_format_h format);
/**
* @brief Specifies whether an #i18n_udate_format_h will perform lenient parsing.
*
* @see i18n_udate_is_lenient()
*/
-int i18n_udate_set_lenient ( i18n_udate_format_h format, i18n_ubool is_lenient );
+int i18n_udate_set_lenient(i18n_udate_format_h format, i18n_ubool is_lenient);
/**
* @brief Gets the #i18n_ucalendar_h associated with an #i18n_udate_format_h.
*
* @see i18n_udate_set_calendar()
*/
-int i18n_udate_get_calendar ( const i18n_udate_format_h format, i18n_ucalendar_h *calendar);
+int i18n_udate_get_calendar(const i18n_udate_format_h format, i18n_ucalendar_h *calendar);
/**
* @brief Sets the #i18n_ucalendar_h associated with an #i18n_udate_format_h.
*
* @see i18n_udate_get_calendar()
*/
-int i18n_udate_set_calendar ( i18n_udate_format_h format, const i18n_ucalendar_h calendar_to_set );
+int i18n_udate_set_calendar(i18n_udate_format_h format, const i18n_ucalendar_h calendar_to_set);
/**
* @brief Gets the #i18n_unumber_format_h associated with an #i18n_udate_format_h.
*
* @see i18n_udate_set_number_format()
*/
-int i18n_udate_get_number_format ( const i18n_udate_format_h format, i18n_unumber_format_h *number_format );
+int i18n_udate_get_number_format(const i18n_udate_format_h format, i18n_unumber_format_h *number_format);
/**
* @brief Sets the #i18n_unumber_format_h associated with an #i18n_udate_format_h.
*
* @see i18n_udate_get_number_format()
*/
-int i18n_udate_set_number_format ( i18n_udate_format_h format, const i18n_unumber_format_h number_format_to_set );
+int i18n_udate_set_number_format(i18n_udate_format_h format, const i18n_unumber_format_h number_format_to_set);
/**
* @brief Gets a locale for which date/time formatting patterns are available.
* @see i18n_udate_count_available()
*/
-const char *i18n_udate_get_available ( int32_t locale_index );
+const char *i18n_udate_get_available(int32_t locale_index);
/**
* @brief Determines how many locales have date/time formatting patterns available.
*
* @see i18n_udate_get_available()
*/
-int32_t i18n_udate_count_available ( void );
+int32_t i18n_udate_count_available(void);
/**
* @brief Gets the year relative to which all 2-digit years are interpreted.
*
* @see i18n_udate_set_2digit_year_start()
*/
-int i18n_udate_get_2digit_year_start ( const i18n_udate_format_h format, i18n_udate *year );
+int i18n_udate_get_2digit_year_start(const i18n_udate_format_h format, i18n_udate *year);
/**
* @brief Sets the year relative to which all 2-digit years will be interpreted.
*
* @see i18n_udate_get_2digit_year_start()
*/
-int i18n_udate_set_2digit_year_start ( i18n_udate_format_h format, i18n_udate date );
+int i18n_udate_set_2digit_year_start(i18n_udate_format_h format, i18n_udate date);
/**
* @brief Extracts the pattern from an #i18n_udate_format_h.
*
* @see i18n_udate_apply_pattern()
*/
-int32_t i18n_udate_to_pattern ( const i18n_udate_format_h format, i18n_ubool localized, i18n_uchar *result,
- int32_t result_length );
+int32_t i18n_udate_to_pattern(const i18n_udate_format_h format, i18n_ubool localized, i18n_uchar *result,
+ int32_t result_length);
/**
* @brief Sets the pattern used by an #i18n_udate_format_h.
*
* @see i18n_udate_to_pattern()
*/
-int i18n_udate_apply_pattern ( i18n_udate_format_h format, i18n_ubool localized, const i18n_uchar *pattern,
- int32_t pattern_length );
+int i18n_udate_apply_pattern(i18n_udate_format_h format, i18n_ubool localized, const i18n_uchar *pattern,
+ int32_t pattern_length);
/**
* @brief Gets the symbols associated with an #i18n_udate_format_h.
* @see i18n_udate_count_symbols()
* @see #i18n_udate_set_symbols()
*/
-int32_t i18n_udate_get_symbols ( const i18n_udate_format_h format, i18n_udate_format_symbol_type_e type, int32_t symbol_index,
- i18n_uchar *result, int32_t result_length );
+int32_t i18n_udate_get_symbols(const i18n_udate_format_h format, i18n_udate_format_symbol_type_e type, int32_t symbol_index,
+ i18n_uchar *result, int32_t result_length);
/**
* @brief Counts the number of particular symbols for an #i18n_udate_format_h.
* @see i18n_udate_get_symbols()
* @see #i18n_udate_set_symbols()
*/
-int32_t i18n_udate_count_symbols ( const i18n_udate_format_h format, i18n_udate_format_symbol_type_e type );
+int32_t i18n_udate_count_symbols(const i18n_udate_format_h format, i18n_udate_format_symbol_type_e type);
/**
* @brief Sets the symbols associated with an #i18n_udate_format_h.
* @see i18n_udate_count_symbols()
* @see #i18n_udate_get_symbols()
*/
-int i18n_udate_set_symbols ( i18n_udate_format_h format, i18n_udate_format_symbol_type_e type, int32_t symbol_index,
- i18n_uchar *value, int32_t value_length );
+int i18n_udate_set_symbols(i18n_udate_format_h format, i18n_udate_format_symbol_type_e type, int32_t symbol_index,
+ i18n_uchar *value, int32_t value_length);
/**
* @brief Gets the locale for this date format object.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-const char * i18n_udate_get_locale_by_type ( const i18n_udate_format_h format, i18n_ulocale_data_locale_type_e type );
+const char * i18n_udate_get_locale_by_type(const i18n_udate_format_h format, i18n_ulocale_data_locale_type_e type);
/**
* @brief Sets a particular #i18n_udisplay_context_e value in the formatter, such as #I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_STANDALONE.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udate_set_context ( i18n_udate_format_h format, i18n_udisplay_context_e value );
+int i18n_udate_set_context(i18n_udate_format_h format, i18n_udisplay_context_e value);
/**
// creates new i18n_udate_format to format dates and times
ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_KR, -1, bestPattern, -1, &formatter_KR);
- if ( ret != I18N_ERROR_NONE ) {
+ if (ret != I18N_ERROR_NONE) {
dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n");
}
if (!formatter_KR) {
dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n");
}
ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_LA, -1, bestPattern, -1, &formatter_LA);
- if ( ret != I18N_ERROR_NONE ) {
+ if (ret != I18N_ERROR_NONE) {
dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n");
}
if (!formatter_LA) {
dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n");
}
ret = i18n_udate_create(I18N_UDATE_PATTERN , I18N_UDATE_PATTERN , locale, utf16_timezone_SaoPaulo, -1, bestPattern, -1, &formatter_SaoPaulo);
- if ( ret != I18N_ERROR_NONE ) {
+ if (ret != I18N_ERROR_NONE) {
dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n");
}
if (!formatter_LA) {
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udatepg_create ( const char *locale, i18n_udatepg_h *dtpg );
+int i18n_udatepg_create(const char *locale, i18n_udatepg_h *dtpg);
/**
* @brief Destroys a generator.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udatepg_destroy ( i18n_udatepg_h dtpg );
+int i18n_udatepg_destroy(i18n_udatepg_h dtpg);
/**
* @brief Gets the best pattern matching the input skeleton.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @retval #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer
*/
-int i18n_udatepg_get_best_pattern ( i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t len, i18n_uchar *best_pattern, int32_t capacity, int32_t *best_pattern_len );
+int i18n_udatepg_get_best_pattern(i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t len, i18n_uchar *best_pattern, int32_t capacity, int32_t *best_pattern_len);
// Newly Added APIs
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udatepg_create_empty (i18n_udatepg_h *dtpg);
+int i18n_udatepg_create_empty(i18n_udatepg_h *dtpg);
/**
* @brief Creates a copy of a generator.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udatepg_clone ( const i18n_udatepg_h dtpg, i18n_udatepg_h * dtpg_clone);
+int i18n_udatepg_clone(const i18n_udatepg_h dtpg, i18n_udatepg_h * dtpg_clone);
/**
* @brief Gets the best pattern matching the input @a skeleton.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_udatepg_get_best_pattern_with_options ( i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t length,
- i18n_udatepg_date_time_pattern_match_options_e options, i18n_uchar *best_pattern, int32_t capacity );
+int32_t i18n_udatepg_get_best_pattern_with_options(i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t length,
+ i18n_udatepg_date_time_pattern_match_options_e options, i18n_uchar *best_pattern, int32_t capacity);
/**
* @brief Gets a unique skeleton from a given pattern. For example, both "MMM-dd" and "dd/MMM" produce the skeleton "MMMdd".
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_udatepg_get_skeleton ( i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t length, i18n_uchar *skeleton, int32_t capacity );
+int32_t i18n_udatepg_get_skeleton(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t length, i18n_uchar *skeleton, int32_t capacity);
/**
* @brief Gets a unique base skeleton from a given pattern.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_udatepg_get_base_skeleton ( i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t length, i18n_uchar *base_skeleton, int32_t capacity );
+int32_t i18n_udatepg_get_base_skeleton(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t length, i18n_uchar *base_skeleton, int32_t capacity);
/**
* @brief Adds a pattern to the generator.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_udatepg_add_pattern ( i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, i18n_ubool override, i18n_uchar *conflicting_pattern, int32_t capacity, i18n_udatepg_date_time_pattern_conflict_e * conflict_status );
+int32_t i18n_udatepg_add_pattern(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, i18n_ubool override, i18n_uchar *conflicting_pattern, int32_t capacity, i18n_udatepg_date_time_pattern_conflict_e * conflict_status);
/**
* @brief An append_item_format is a pattern used to append a field if there is no good match.
*
* @see i18n_udatepg_get_append_item_format()
*/
-int i18n_udatepg_set_append_item_format ( i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, const i18n_uchar *value, int32_t length );
+int i18n_udatepg_set_append_item_format(i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, const i18n_uchar *value, int32_t length);
/**
* @brief Getter corresponding to i18n_udatepg_set_append_item_format().
*
* @see i18n_udatepg_set_append_item_format()
*/
-const i18n_uchar *i18n_udatepg_get_append_item_format ( const i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, int32_t *pattern_length );
+const i18n_uchar *i18n_udatepg_get_append_item_format(const i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, int32_t *pattern_length);
/**
* @brief Sets the name of field, e.g. "era" in English for ERA.
*
* @see i18n_udatepg_get_append_item_name()
*/
-int i18n_udatepg_set_append_item_name ( i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, const i18n_uchar *value,
- int32_t length );
+int i18n_udatepg_set_append_item_name(i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, const i18n_uchar *value,
+ int32_t length);
/**
* @brief Getter corresponding to i18n_udatepg_set_append_item_name().
*
* @see i18n_udatepg_set_append_item_name()
*/
-const i18n_uchar *i18n_udatepg_get_append_item_name ( const i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field,
- int32_t *pattern_length );
+const i18n_uchar *i18n_udatepg_get_append_item_name(const i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field,
+ int32_t *pattern_length);
/**
* @brief The date time format is a message format pattern used to compose date and time patterns.
*
* @see i18n_udatepg_get_date_time_format()
*/
-int i18n_udatepg_set_date_time_format ( const i18n_udatepg_h dtpg, const i18n_uchar *date_time_format, int32_t length );
+int i18n_udatepg_set_date_time_format(const i18n_udatepg_h dtpg, const i18n_uchar *date_time_format, int32_t length);
/**
* @brief Getter corresponding to i18n_udatepg_set_date_time_format().
*
* @see i18n_udatepg_set_date_time_format()
*/
-const i18n_uchar *i18n_udatepg_get_date_time_format ( const i18n_udatepg_h dtpg, int32_t *pattern_length );
+const i18n_uchar *i18n_udatepg_get_date_time_format(const i18n_udatepg_h dtpg, int32_t *pattern_length);
/**
* @brief The decimal value is used in formatting fractions of seconds.
*
* @see i18n_udatepg_get_decimal()
*/
-int i18n_udatepg_set_decimal ( i18n_udatepg_h dtpg, const i18n_uchar *decimal, int32_t length );
+int i18n_udatepg_set_decimal(i18n_udatepg_h dtpg, const i18n_uchar *decimal, int32_t length);
/**
* @brief Getter corresponding to i18n_udatepg_set_decimal().
*
* @see i18n_udatepg_set_decimal()
*/
-const i18n_uchar *i18n_udatepg_get_decimal ( const i18n_udatepg_h dtpg, int32_t *pattern_length );
+const i18n_uchar *i18n_udatepg_get_decimal(const i18n_udatepg_h dtpg, int32_t *pattern_length);
/**
* @brief Adjusts the field types (width and subtype) of a @a pattern to match what is in a @a skeleton.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_udatepg_replace_field_types ( i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length,
- const i18n_uchar *skeleton, int32_t skeleton_length, i18n_uchar *dest, int32_t dest_capacity );
+int32_t i18n_udatepg_replace_field_types(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length,
+ const i18n_uchar *skeleton, int32_t skeleton_length, i18n_uchar *dest, int32_t dest_capacity);
/**
* @brief Adjusts the field types (width and subtype) of a pattern to match what is in a @a skeleton.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_udatepg_replace_field_types_with_options ( i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length,
+int32_t i18n_udatepg_replace_field_types_with_options(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length,
const i18n_uchar *skeleton, int32_t skeleton_length, i18n_udatepg_date_time_pattern_match_options_e options,
- i18n_uchar *dest, int32_t dest_capacity );
+ i18n_uchar *dest, int32_t dest_capacity);
/**
* @brief Creates an #i18n_uenumeration_h for list of all the skeletons in canonical form.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udatepg_skeletons_create ( const i18n_udatepg_h dtpg, i18n_uenumeration_h *enumeration );
+int i18n_udatepg_skeletons_create(const i18n_udatepg_h dtpg, i18n_uenumeration_h *enumeration);
/**
* @brief Creates an #i18n_uenumeration_h for list of all the base skeletons in canonical form.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udatepg_base_skeletons_create ( const i18n_udatepg_h dtpg, i18n_uenumeration_h *enumeration );
+int i18n_udatepg_base_skeletons_create(const i18n_udatepg_h dtpg, i18n_uenumeration_h *enumeration);
/**
* @brief Gets the pattern corresponding to a given skeleton.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-const i18n_uchar *i18n_udatepg_get_pattern_for_skeleton ( const i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t skeleton_length, int32_t *pattern_length );
+const i18n_uchar *i18n_udatepg_get_pattern_for_skeleton(const i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t skeleton_length, int32_t *pattern_length);
#ifdef __cplusplus
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uenumeration_destroy ( i18n_uenumeration_h enumeration );
+int i18n_uenumeration_destroy(i18n_uenumeration_h enumeration);
/**
* @brief Returns the number of elements that the iterator traverses.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @exception #I18N_ERROR_ENUM_OUT_OF_SYNC The iterator is out of sync
*/
-int32_t i18n_uenumeration_count ( i18n_uenumeration_h enumeration );
+int32_t i18n_uenumeration_count(i18n_uenumeration_h enumeration);
/**
* @brief Returns the next element in the iterator's list.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @exception #I18N_ERROR_ENUM_OUT_OF_SYNC The iterator is out of sync
*/
-const i18n_uchar *i18n_uenumeration_unext ( i18n_uenumeration_h enumeration, int32_t *result_length );
+const i18n_uchar *i18n_uenumeration_unext(i18n_uenumeration_h enumeration, int32_t *result_length);
/**
* @brief Returns the next element in the iterator's list.
* @exception #I18N_ERROR_INVARIANT_CONVERSION The underlying native string is <code>i18n_uchar*</code> and conversion to <code>char*</code> with the invariant converter fails.
* This error pertains only to current string, so iteration might be able to continue successfully.
*/
-const char *i18n_uenumeration_next ( i18n_uenumeration_h enumeration, int32_t *result_length );
+const char *i18n_uenumeration_next(i18n_uenumeration_h enumeration, int32_t *result_length);
/**
* @brief Resets the iterator to the current list of service IDs.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uenumeration_reset ( i18n_uenumeration_h enumeration );
+int i18n_uenumeration_reset(i18n_uenumeration_h enumeration);
/**
* @brief Given an array of <code>const i18n_uchar*</code> strings, return an #i18n_uenumeration_h.
*
* @see i18n_uenumeration_destroy()
*/
-int i18n_uenumeration_uchar_strings_enumeration_create(const i18n_uchar *const strings[], int32_t count, i18n_uenumeration_h *enumeration );
+int i18n_uenumeration_uchar_strings_enumeration_create(const i18n_uchar *const strings[], int32_t count, i18n_uenumeration_h *enumeration);
/**
* @brief Given an array of <code>const char*</code> strings (invariant chars only), return an #i18n_uenumeration_h.
*
* @see i18n_uenumeration_destroy()
*/
-int i18n_uenumeration_char_strings_enumeration_create(const char* const strings[], int32_t count, i18n_uenumeration_h *enumeration );
+int i18n_uenumeration_char_strings_enumeration_create(const char* const strings[], int32_t count, i18n_uenumeration_h *enumeration);
/**
* @}
// Gets default locale
ret = i18n_ulocale_get_default(&locale);
- if ( ret != I18N_ERROR_NONE ) {
+ if (ret != I18N_ERROR_NONE) {
dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_default() failed!!! \n");
}
dlog_print(DLOG_INFO, LOG_TAG, "default locale : %s\n", locale); // default locale : en_GB.UTF-8
// Gets the language code for the specified locale
ret = i18n_ulocale_get_language(locale, language, language_capacity, &buf_size_language);
- if ( ret != I18N_ERROR_NONE ) {
+ if (ret != I18N_ERROR_NONE) {
dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_language() failed!!! \n");
}
dlog_print(DLOG_INFO, LOG_TAG, "language code for the locale : %s\n", language); // language code for the locale : en
// Gets the full name suitable for display for the specified locale
ret = i18n_ulocale_get_display_name(locale, in_locale_id, result_w, 64, &buf_size_display_name);
- if ( ret != I18N_ERROR_NONE ) {
+ if (ret != I18N_ERROR_NONE) {
dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_display_name() failed!!! \n");
}
i18n_ustring_copy_au(result, result_w);
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ulocale_get_default ( const char **locale );
+int i18n_ulocale_get_default(const char **locale);
/**
* @brief Sets I18N's default locale.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ulocale_set_default ( const char *locale_id );
+int i18n_ulocale_set_default(const char *locale_id);
/**
* @brief Gets the language code for the specified locale.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ulocale_get_language ( const char *locale_id, char *language, int32_t language_capacity, int32_t *buf_size_language );
+int i18n_ulocale_get_language(const char *locale_id, char *language, int32_t language_capacity, int32_t *buf_size_language);
/**
* @brief Gets the country code for the specified locale.
* @return The actual buffer size needed for the country code.\n
* If it's greater than @a country_capacity, the returned country code will be truncated.
*/
-int32_t i18n_ulocale_get_country ( const char *locale_id, char *country, int32_t country_capacity, int *error );
+int32_t i18n_ulocale_get_country(const char *locale_id, char *country, int32_t country_capacity, int *error);
/**
* @brief Gets the full name suitable for display for the specified locale.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ulocale_get_display_name ( const char *locale_id, const char *in_locale_id, i18n_uchar *result, int32_t max_result_size, int32_t *buf_size_display_name );
+int i18n_ulocale_get_display_name(const char *locale_id, const char *in_locale_id, i18n_uchar *result, int32_t max_result_size, int32_t *buf_size_display_name);
/**
* @brief Gets the specified locale from a list of all available locales.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-const char* i18n_ulocale_get_available ( int32_t n );
+const char* i18n_ulocale_get_available(int32_t n);
/**
* @brief Gets the size of the all available locale list.
* @return The size of the locale list
* @exception #I18N_ERROR_NONE Success
*/
-int32_t i18n_ulocale_count_available ( void );
+int32_t i18n_ulocale_count_available(void);
// Newly Added APIs
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_get_script ( const char *locale_id, char *script, int32_t script_capacity );
+int32_t i18n_ulocale_get_script(const char *locale_id, char *script, int32_t script_capacity);
/**
* @brief Gets the variant code for the specified locale.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_get_variant ( const char *locale_id, char *variant, int32_t variant_capacity );
+int32_t i18n_ulocale_get_variant(const char *locale_id, char *variant, int32_t variant_capacity);
/**
* @brief Gets the full name for the specified locale.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer
*/
-int32_t i18n_ulocale_get_name ( const char *locale_id, char *name, int32_t name_capacity );
+int32_t i18n_ulocale_get_name(const char *locale_id, char *name, int32_t name_capacity);
/**
* @brief Gets the full name for the specified locale.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer
*/
-int32_t i18n_ulocale_canonicalize ( const char *locale_id, char *name, int32_t name_capacity );
+int32_t i18n_ulocale_canonicalize(const char *locale_id, char *name, int32_t name_capacity);
/**
* @brief Gets the ISO language code for the specified locale.
*
* @exception #I18N_ERROR_NONE Successful
*/
-const char * i18n_ulocale_get_iso3_language ( const char *locale_id );
+const char * i18n_ulocale_get_iso3_language(const char *locale_id);
/**
* @brief Gets the ISO country code for the specified locale.
*
* @exception #I18N_ERROR_NONE Successful
*/
-const char * i18n_ulocale_get_iso3_country ( const char *locale_id );
+const char * i18n_ulocale_get_iso3_country(const char *locale_id);
/**
* @brief Gets the Win32 LCID value for the specified locale.
*
* @exception #I18N_ERROR_NONE Successful
*/
-uint32_t i18n_ulocale_get_lcid ( const char *locale_id );
+uint32_t i18n_ulocale_get_lcid(const char *locale_id);
/**
* @brief Gets the language name suitable for display for the specified locale.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_get_display_language ( const char *locale, const char *display_locale, i18n_uchar *language, int32_t language_capacity );
+int32_t i18n_ulocale_get_display_language(const char *locale, const char *display_locale, i18n_uchar *language, int32_t language_capacity);
/**
* @brief Gets the script name suitable for display for the specified locale.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_get_display_script ( const char *locale, const char *display_locale, i18n_uchar *script, int32_t script_capacity );
+int32_t i18n_ulocale_get_display_script(const char *locale, const char *display_locale, i18n_uchar *script, int32_t script_capacity);
/**
* @brief Gets the country name suitable for display for the specified locale.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_get_display_country ( const char *locale, const char *display_locale, i18n_uchar *country, int32_t country_capacity );
+int32_t i18n_ulocale_get_display_country(const char *locale, const char *display_locale, i18n_uchar *country, int32_t country_capacity);
/**
* @brief Gets the variant name suitable for display for the specified locale.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_get_display_variant ( const char *locale, const char *display_locale, i18n_uchar *variant, int32_t variant_capacity );
+int32_t i18n_ulocale_get_display_variant(const char *locale, const char *display_locale, i18n_uchar *variant, int32_t variant_capacity);
/**
* @brief Gets the keyword name suitable for display for the specified locale.
* @see i18n_uenumeration_next()
* @see i18n_uenumeration_destroy()
*/
-int32_t i18n_ulocale_get_display_keyword ( const char *keyword, const char *display_locale, i18n_uchar *dest, int32_t dest_capacity );
+int32_t i18n_ulocale_get_display_keyword(const char *keyword, const char *display_locale, i18n_uchar *dest, int32_t dest_capacity);
/**
* @brief Gets the value of the keyword suitable for display for the specified locale.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_get_display_keyword_value ( const char *locale, const char *keyword, const char *display_locale, i18n_uchar *dest, int32_t dest_capacity );
+int32_t i18n_ulocale_get_display_keyword_value(const char *locale, const char *keyword, const char *display_locale, i18n_uchar *dest, int32_t dest_capacity);
/**
* @brief Gets a list of all available 2-letter language codes defined in ISO 639,
*
* @exception #I18N_ERROR_NONE Successful
*/
-const char * const *i18n_ulocale_get_iso_languages ( void );
+const char * const *i18n_ulocale_get_iso_languages(void);
/**
*
*
* @exception #I18N_ERROR_NONE Successful
*/
-const char * const *i18n_ulocale_get_iso_countries ( void );
+const char * const *i18n_ulocale_get_iso_countries(void);
/**
* @brief Truncates the locale ID string to get the parent locale ID.
* in the @a locale_id from index 0 to the index of the last occurrence of
* the underscore ("_") symbol.
*/
-int32_t i18n_ulocale_get_parent ( const char *locale_id, char *parent, int32_t parent_capacity );
+int32_t i18n_ulocale_get_parent(const char *locale_id, char *parent, int32_t parent_capacity);
/**
* @brief Gets the full name for the specified locale, like i18n_ulocale_get_name(), but without keywords.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer
*/
-int32_t i18n_ulocale_get_base_name ( const char *locale_id, char *name, int32_t name_capacity );
+int32_t i18n_ulocale_get_base_name(const char *locale_id, char *name, int32_t name_capacity);
/**
* @brief Gets an enumeration of keywords for the specified locale.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ulocale_keywords_create ( const char *locale_id, i18n_uenumeration_h *enumeration );
+int i18n_ulocale_keywords_create(const char *locale_id, i18n_uenumeration_h *enumeration);
/**
* @brief Gets the value for a keyword.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_get_keyword_value ( const char *locale_id, const char *keyword_name, char *buffer, int32_t buffer_capacity );
+int32_t i18n_ulocale_get_keyword_value(const char *locale_id, const char *keyword_name, char *buffer, int32_t buffer_capacity);
/**
* @brief Sets or removes the value of the specified keyword.
*
* @see i18n_ulocale_get_keyword_value()
*/
-int32_t i18n_ulocale_set_keyword_value ( const char *keyword_name, const char *keyword_value, char *buffer, int32_t buffer_capacity );
+int32_t i18n_ulocale_set_keyword_value(const char *keyword_name, const char *keyword_value, char *buffer, int32_t buffer_capacity);
/**
* @brief Gets the layout character orientation for the specified locale.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ulocale_get_character_orientation ( const char *locale_id, i18n_ulocale_layout_type_e *layout_type );
+int i18n_ulocale_get_character_orientation(const char *locale_id, i18n_ulocale_layout_type_e *layout_type);
/**
* @brief Gets the layout line orientation for the specified locale.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ulocale_get_line_orientation ( const char *locale_id, i18n_ulocale_layout_type_e *layout_type );
+int i18n_ulocale_get_line_orientation(const char *locale_id, i18n_ulocale_layout_type_e *layout_type);
/**
* @brief Gets the I18N locale ID for the specified Win32 LCID value.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_get_locale_for_lcid ( uint32_t host_id, char *locale, int32_t locale_capacity );
+int32_t i18n_ulocale_get_locale_for_lcid(uint32_t host_id, char *locale, int32_t locale_capacity);
/**
* @brief Adds the likely subtags for a provided locale ID, per the algorithm described
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_add_likely_subtags ( const char *locale_id, char *maximized_locale_id, int32_t maximized_locale_id_capacity );
+int32_t i18n_ulocale_add_likely_subtags(const char *locale_id, char *maximized_locale_id, int32_t maximized_locale_id_capacity);
/**
* @brief Minimizes the subtags for a provided locale ID, per the algorithm described
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_minimize_subtags ( const char *locale_id, char *minimized_locale_id, int32_t minimized_locale_id_capacity );
+int32_t i18n_ulocale_minimize_subtags(const char *locale_id, char *minimized_locale_id, int32_t minimized_locale_id_capacity);
/**
* @brief Returns a locale ID for the specified BCP47 language tag string.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_for_language_tag ( const char *langtag, char *locale_id, int32_t locale_id_capacity, int32_t *parsed_length );
+int32_t i18n_ulocale_for_language_tag(const char *langtag, char *locale_id, int32_t locale_id_capacity, int32_t *parsed_length);
/**
* @brief Returns a well-formed language tag for this locale ID.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_to_language_tag ( const char *locale_id, char *langtag, int32_t langtag_capacity, i18n_ubool strict );
+int32_t i18n_ulocale_to_language_tag(const char *locale_id, char *langtag, int32_t langtag_capacity, i18n_ubool strict);
#ifdef __cplusplus
}
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_unormalization_get_instance (const char *package_name, const char *name, i18n_unormalization_mode_e mode,
+int i18n_unormalization_get_instance(const char *package_name, const char *name, i18n_unormalization_mode_e mode,
i18n_unormalizer_h *normalizer);
/**
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_unormalization_normalize (i18n_unormalizer_h normalizer, const i18n_uchar *src, int32_t len, i18n_uchar *dest, int32_t capacity, int32_t *len_deststr);
+int i18n_unormalization_normalize(i18n_unormalizer_h normalizer, const i18n_uchar *src, int32_t len, i18n_uchar *dest, int32_t capacity, int32_t *len_deststr);
#ifdef __cplusplus
}
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_unumber_create ( i18n_unumber_format_style_e style, const i18n_uchar *pattern, int32_t pattern_len, const char *locale,
- i18n_uparse_error_s *parse_err, i18n_unumber_format_h *num_format );
+int i18n_unumber_create(i18n_unumber_format_style_e style, const i18n_uchar *pattern, int32_t pattern_len, const char *locale,
+ i18n_uparse_error_s *parse_err, i18n_unumber_format_h *num_format);
/**
* @brief Destroys an #i18n_unumber_format_h.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_unumber_destroy ( i18n_unumber_format_h fmt );
+int i18n_unumber_destroy(i18n_unumber_format_h fmt);
/**
* @brief Gets a symbol associated with an #i18n_unumber_format_h.
* @retval #I18N_ERROR_NONE Successful.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_unumber_get_symbol ( const i18n_unumber_format_h fmt, i18n_unumber_format_symbol_e symbol, i18n_uchar *buffer, int32_t size, int32_t *len_symbol );
+int i18n_unumber_get_symbol(const i18n_unumber_format_h fmt, i18n_unumber_format_symbol_e symbol, i18n_uchar *buffer, int32_t size, int32_t *len_symbol);
// Newly Added APIs
* @retval #I18N_ERROR_NONE Successful.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_unumber_clone (const i18n_unumber_format_h fmt, i18n_unumber_format_h *fmt_clone);
+int i18n_unumber_clone(const i18n_unumber_format_h fmt, i18n_unumber_format_h *fmt_clone);
/**
* @brief Formats an integer using a i18n_unumber_format_h.
*
* @return The total buffer size needed; if greater than result_length, the output was truncated.
*/
-int32_t i18n_unumber_format (const i18n_unumber_format_h fmt, int32_t number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_s *pos, i18n_error_code_e *status);
+int32_t i18n_unumber_format(const i18n_unumber_format_h fmt, int32_t number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_s *pos, i18n_error_code_e *status);
/**
* @brief Formats an int64 using an #i18n_unumber_format_h.
* @exception #I18N_WARNING_STRING_NOT_TERMINATED If the formatted number fits into @a result but cannot be NULL-terminated (<code>length == result_length</code>)
* @exception #I18N_ERROR_BUFFER_OVERFLOW If the formatted number doesn't fit into the @a result buffer
*/
-int32_t i18n_unumber_format_int64 (const i18n_unumber_format_h fmt, int64_t number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos);
+int32_t i18n_unumber_format_int64(const i18n_unumber_format_h fmt, int64_t number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos);
/**
* @brief Formats a double using an #i18n_unumber_format_h.
* @exception #I18N_WARNING_STRING_NOT_TERMINATED If the formatted number fits into @a result but cannot be NULL-terminated (<code>length == result_length</code>)
* @exception #I18N_ERROR_BUFFER_OVERFLOW If the formatted number doesn't fit into the @a result buffer
*/
-int32_t i18n_unumber_format_double (const i18n_unumber_format_h fmt, double number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos);
+int32_t i18n_unumber_format_double(const i18n_unumber_format_h fmt, double number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos);
/**
* @brief Formats a decimal number using an #i18n_unumber_format_h.
* @exception #I18N_WARNING_STRING_NOT_TERMINATED If the formatted number fits into @a result but cannot be NULL-terminated (<code>length == result_length</code>)
* @exception #I18N_ERROR_BUFFER_OVERFLOW If the formatted number doesn't fit into the @a result buffer
*/
-int32_t i18n_unumber_format_decimal (const i18n_unumber_format_h fmt, const char *number, int32_t length, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos);
+int32_t i18n_unumber_format_decimal(const i18n_unumber_format_h fmt, const char *number, int32_t length, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos);
/**
* @brief Formats a double currency amount using an #i18n_unumber_format_h.
* @exception #I18N_WARNING_STRING_NOT_TERMINATED If the formatted number fits into @a result but cannot be NULL-terminated (<code>length == result_length</code>)
* @exception #I18N_ERROR_BUFFER_OVERFLOW If the formatted number doesn't fit into the @a result buffer
*/
-int32_t i18n_unumber_format_double_currency (const i18n_unumber_format_h fmt, double number, i18n_uchar *currency, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos);
+int32_t i18n_unumber_format_double_currency(const i18n_unumber_format_h fmt, double number, i18n_uchar *currency, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos);
/**
* @brief Parses a string into an integer using an #i18n_unumber_format_h.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_unumber_parse (const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos);
+int32_t i18n_unumber_parse(const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos);
/**
* @brief Parses a string into an int64 using an #i18n_unumber_format_h.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int64_t i18n_unumber_parse_int64 (const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos);
+int64_t i18n_unumber_parse_int64(const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos);
/**
* @brief Parses a string into a double using an #i18n_unumber_format_h.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-double i18n_unumber_parse_double (const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos);
+double i18n_unumber_parse_double(const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos);
/**
* @brief Parses a number from a string into an unformatted numeric string using an #i18n_unumber_format_h.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_unumber_parse_decimal (const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, char *out_buf, int32_t out_buf_length);
+int32_t i18n_unumber_parse_decimal(const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, char *out_buf, int32_t out_buf_length);
/**
* @brief Parses a string into a double and a currency using an #i18n_unumber_format_h.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-double i18n_unumber_parse_double_currency (const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, i18n_uchar *currency);
+double i18n_unumber_parse_double_currency(const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, i18n_uchar *currency);
/**
* @brief Sets the pattern used by an #i18n_unumber_format_h.
* @retval #I18N_ERROR_NONE Successful.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_unumber_apply_pattern (i18n_unumber_format_h format, i18n_ubool localized, const i18n_uchar *pattern, int32_t pattern_length, i18n_uparse_error_s* parse_error);
+int i18n_unumber_apply_pattern(i18n_unumber_format_h format, i18n_ubool localized, const i18n_uchar *pattern, int32_t pattern_length, i18n_uparse_error_s* parse_error);
/**
* @brief Gets a locale for which decimal formatting patterns are available.
*
* @exception #I18N_ERROR_NONE Successful
*/
-const char *i18n_unumber_get_available (int32_t locale_index);
+const char *i18n_unumber_get_available(int32_t locale_index);
/**
* @brief Determines how many locales have decimal formatting patterns available.
*
* @exception #I18N_ERROR_NONE Successful
*/
-int32_t i18n_unumber_count_available (void);
+int32_t i18n_unumber_count_available(void);
/**
* @brief Gets a numeric attribute associated with an #i18n_unumber_format_h.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_unumber_get_attribute (const i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr);
+int32_t i18n_unumber_get_attribute(const i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr);
/**
* @brief Sets a numeric attribute associated with an #i18n_unumber_format_h.
* @retval #I18N_ERROR_NONE Successful.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_unumber_set_attribute (i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr, int32_t new_value);
+int i18n_unumber_set_attribute(i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr, int32_t new_value);
/**
* @brief Gets a numeric attribute associated with an #i18n_unumber_format_h.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-double i18n_unumber_get_double_attribute (const i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr);
+double i18n_unumber_get_double_attribute(const i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr);
/**
* @brief Sets a numeric attribute associated with an #i18n_unumber_format_h.
* @retval #I18N_ERROR_NONE Successful.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_unumber_set_double_attribute (i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr, double new_value);
+int i18n_unumber_set_double_attribute(i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr, double new_value);
/**
* @brief Gets a text attribute associated with an #i18n_unumber_format_h.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_unumber_get_text_attribute (const i18n_unumber_format_h fmt, i18n_unumber_format_text_attribute_e tag, i18n_uchar *result, int32_t result_length);
+int32_t i18n_unumber_get_text_attribute(const i18n_unumber_format_h fmt, i18n_unumber_format_text_attribute_e tag, i18n_uchar *result, int32_t result_length);
/**
* @brief Sets a text attribute associated with an #i18n_unumber_format_h.
* @retval #I18N_ERROR_NONE Successful.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_unumber_set_text_attribute (const i18n_unumber_format_h fmt, i18n_unumber_format_text_attribute_e tag, const i18n_uchar *new_value, int32_t new_value_length);
+int i18n_unumber_set_text_attribute(const i18n_unumber_format_h fmt, i18n_unumber_format_text_attribute_e tag, const i18n_uchar *new_value, int32_t new_value_length);
/**
* @brief Extracts the pattern from an #i18n_unumber_format_h.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_unumber_to_pattern (const i18n_unumber_format_h fmt, i18n_ubool is_pattern_localized, i18n_uchar *result, int32_t result_length);
+int32_t i18n_unumber_to_pattern(const i18n_unumber_format_h fmt, i18n_ubool is_pattern_localized, i18n_uchar *result, int32_t result_length);
/**
* @brief Sets a symbol associated with an #i18n_unumber_format_h.
* @retval #I18N_ERROR_NONE Successful.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_unumber_set_symbol (i18n_unumber_format_h fmt, i18n_unumber_format_symbol_e symbol, const i18n_uchar *value, int32_t length);
+int i18n_unumber_set_symbol(i18n_unumber_format_h fmt, i18n_unumber_format_symbol_e symbol, const i18n_uchar *value, int32_t length);
/**
* @brief Gets the locale for this number format object.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-const char *i18n_unumber_get_locale_by_type (const i18n_unumber_format_h fmt, i18n_ulocale_data_locale_type_e type);
+const char *i18n_unumber_get_locale_by_type(const i18n_unumber_format_h fmt, i18n_ulocale_data_locale_type_e type);
#ifdef __cplusplus
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_usearch_create ( const i18n_uchar *pattern, int32_t pattern_len, const i18n_uchar *text, int32_t text_len, const char *locale, i18n_ubreak_iterator_s *break_iter, i18n_usearch_h *search_iter );
+int i18n_usearch_create(const i18n_uchar *pattern, int32_t pattern_len, const i18n_uchar *text, int32_t text_len, const char *locale, i18n_ubreak_iterator_s *break_iter, i18n_usearch_h *search_iter);
/**
* @brief Creates an #i18n_usearch_h using the argument locale language rule set.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_usearch_create_new ( const i18n_uchar *pattern, int32_t pattern_len, const i18n_uchar *text,
+int i18n_usearch_create_new(const i18n_uchar *pattern, int32_t pattern_len, const i18n_uchar *text,
int32_t text_len, const char *locale, i18n_ubreak_iterator_h break_iter, i18n_usearch_h *search_iter);
/**
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_usearch_destroy ( i18n_usearch_h search_iter );
+int i18n_usearch_destroy(i18n_usearch_h search_iter);
/**
* @brief Returns the text that matches by the most recent call to i18n_usearch_first(), or so on.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @retval #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer
*/
-int i18n_usearch_get_matched_text ( const i18n_usearch_h search_iter, i18n_uchar *result, int32_t result_capacity, int32_t *len_matched_text );
+int i18n_usearch_get_matched_text(const i18n_usearch_h search_iter, i18n_uchar *result, int32_t result_capacity, int32_t *len_matched_text);
/**
* @brief Gets the collator used for the language rules.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_usearch_get_collator ( const i18n_usearch_h search_iter, i18n_ucollator_h *collator );
+int i18n_usearch_get_collator(const i18n_usearch_h search_iter, i18n_ucollator_h *collator);
/**
* @brief Returns the first index at which the string text matches the search pattern.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_usearch_first ( i18n_usearch_h search_iter, int32_t *index_first );
+int i18n_usearch_first(i18n_usearch_h search_iter, int32_t *index_first);
#ifdef __cplusplus
}
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_uset_destroy()
*/
-int i18n_uset_create_empty (i18n_uset_h *set);
+int i18n_uset_create_empty(i18n_uset_h *set);
/**
* @brief Creates an #i18n_uset_h object that contains the range of characters
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_uset_destroy()
*/
-int i18n_uset_create (i18n_uchar32 start, i18n_uchar32 end, i18n_uset_h *set);
+int i18n_uset_create(i18n_uchar32 start, i18n_uchar32 end, i18n_uset_h *set);
/**
* @brief Creates a set based on a given pattern.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_uset_destroy()
*/
-int i18n_uset_create_pattern (const i18n_uchar *pattern, int32_t pattern_length, i18n_uset_h *set);
+int i18n_uset_create_pattern(const i18n_uchar *pattern, int32_t pattern_length, i18n_uset_h *set);
/**
* @brief Creates a set based on a given pattern.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_uset_destroy()
*/
-int i18n_uset_create_pattern_options (const i18n_uchar *pattern, int32_t pattern_length, uint32_t options, i18n_uset_h *set);
+int i18n_uset_create_pattern_options(const i18n_uchar *pattern, int32_t pattern_length, uint32_t options, i18n_uset_h *set);
/**
* @brief Disposes of the storage used by a #i18n_uset_h object.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_destroy (i18n_uset_h set);
+int i18n_uset_destroy(i18n_uset_h set);
/**
* @brief Returns a copy of this object.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_uset_clone_as_thawed()
*/
-int i18n_uset_clone (const i18n_uset_h set, i18n_uset_h *set_clone);
+int i18n_uset_clone(const i18n_uset_h set, i18n_uset_h *set_clone);
/**
* @brief Determines whether the set has been frozen (made immutable) or not.
* @see i18n_uset_freeze()
* @see i18n_uset_clone_as_thawed()
*/
-i18n_ubool i18n_uset_is_frozen (const i18n_uset_h set);
+i18n_ubool i18n_uset_is_frozen(const i18n_uset_h set);
/**
* @brief Freezes the set (make it immutable).
* @see i18n_uset_is_frozen()
* @see i18n_uset_clone_as_thawed()
*/
-int i18n_uset_freeze (i18n_uset_h set);
+int i18n_uset_freeze(i18n_uset_h set);
/**
* @brief Clones the set and make the clone mutable.
* @see i18n_uset_is_frozen()
* @see i18n_uset_clone()
*/
-int i18n_uset_clone_as_thawed (const i18n_uset_h set, i18n_uset_h *set_copy);
+int i18n_uset_clone_as_thawed(const i18n_uset_h set, i18n_uset_h *set_copy);
/**
* @brief Causes the #i18n_uset_h object to represent the range <code>start - end</code>.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_set (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end);
+int i18n_uset_set(i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end);
/**
* @brief Modifies the set to represent the set specified by the given
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_uset_apply_pattern (i18n_uset_h set, const i18n_uchar *pattern, int32_t pattern_length, uint32_t options);
+int32_t i18n_uset_apply_pattern(i18n_uset_h set, const i18n_uchar *pattern, int32_t pattern_length, uint32_t options);
/**
* @brief Modifies the set to contain those code points which have the given value
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_apply_int_property_value (i18n_uset_h set, i18n_uchar_uproperty_e prop, int32_t value);
+int i18n_uset_apply_int_property_value(i18n_uset_h set, i18n_uchar_uproperty_e prop, int32_t value);
/**
* @brief Modifies the set to contain those code points which have the
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_apply_property_alias (i18n_uset_h set, const i18n_uchar *prop, int32_t prop_length, const i18n_uchar *value, int32_t value_length);
+int i18n_uset_apply_property_alias(i18n_uset_h set, const i18n_uchar *prop, int32_t prop_length, const i18n_uchar *value, int32_t value_length);
/**
* @brief Return true if the given position, in the given pattern, appears
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_uset_resembles_pattern (const i18n_uchar *pattern, int32_t pattern_length, int32_t pos);
+i18n_ubool i18n_uset_resembles_pattern(const i18n_uchar *pattern, int32_t pattern_length, int32_t pos);
/**
* @brief Returns a string representation of the given @a set.
*
* @see i18n_uset_pattern_create()
*/
-int32_t i18n_uset_to_pattern (const i18n_uset_h set, i18n_uchar *result, int32_t result_capacity, i18n_ubool escape_unprintable);
+int32_t i18n_uset_to_pattern(const i18n_uset_h set, i18n_uchar *result, int32_t result_capacity, i18n_ubool escape_unprintable);
/**
* @brief Adds the given character to the given #i18n_uset_h.
*
* @see i18n_uset_contains()
*/
-int i18n_uset_add (i18n_uset_h set, i18n_uchar32 character);
+int i18n_uset_add(i18n_uset_h set, i18n_uchar32 character);
/**
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_add_all (i18n_uset_h set, const i18n_uset_h additional_set);
+int i18n_uset_add_all(i18n_uset_h set, const i18n_uset_h additional_set);
/**
* @brief Adds the given range of characters to the given #i18n_uset_h. After this call,
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_uset_contains()
*/
-int i18n_uset_add_range (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end);
+int i18n_uset_add_range(i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end);
/**
* @brief Adds the given string to the given #i18n_uset_h.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_uset_contains_string()
*/
-int i18n_uset_add_string (i18n_uset_h set, const i18n_uchar *str, int32_t str_len);
+int i18n_uset_add_string(i18n_uset_h set, const i18n_uchar *str, int32_t str_len);
/**
* @brief Adds each of the characters in this string to the set. Thus "ch" => {"c", "h"}
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_add_all_code_points (i18n_uset_h set, const i18n_uchar *str, int32_t str_len);
+int i18n_uset_add_all_code_points(i18n_uset_h set, const i18n_uchar *str, int32_t str_len);
/**
* @brief Removes the given @a character from the given #i18n_uset_h.
*
* @see i18n_uset_contains()
*/
-int i18n_uset_remove (i18n_uset_h set, i18n_uchar32 character);
+int i18n_uset_remove(i18n_uset_h set, i18n_uchar32 character);
/**
* @brief Removes the given range of characters from the given #i18n_uset_h.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_uset_contains()
*/
-int i18n_uset_remove_range (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end);
+int i18n_uset_remove_range(i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end);
/**
* @brief Removes the given string to the given #i18n_uset_h.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_uset_contains_string()
*/
-int i18n_uset_remove_string (i18n_uset_h set, const i18n_uchar *str, int32_t str_len);
+int i18n_uset_remove_string(i18n_uset_h set, const i18n_uchar *str, int32_t str_len);
/**
* @brief Removes from this set all of its elements that are contained in the specified set.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_remove_all (i18n_uset_h set, const i18n_uset_h remove_set);
+int i18n_uset_remove_all(i18n_uset_h set, const i18n_uset_h remove_set);
/**
* @brief Retains only the elements in this set that are contained in the specified range.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_retain (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end);
+int i18n_uset_retain(i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end);
/**
* @brief Retains only the elements in this set that are contained in the
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_retain_all (i18n_uset_h set, const i18n_uset_h retain);
+int i18n_uset_retain_all(i18n_uset_h set, const i18n_uset_h retain);
/**
* @brief Reallocates this objects internal structures to take up the least
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_compact (i18n_uset_h set);
+int i18n_uset_compact(i18n_uset_h set);
/**
* @brief Inverts this set. This operation modifies this set so that
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_complement (i18n_uset_h set);
+int i18n_uset_complement(i18n_uset_h set);
/**
* @brief Complements in this set all elements contained in the specified set.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_complement_all (i18n_uset_h set, const i18n_uset_h complement);
+int i18n_uset_complement_all(i18n_uset_h set, const i18n_uset_h complement);
/**
* @brief Removes all of the elements from this set.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_clear (i18n_uset_h set);
+int i18n_uset_clear(i18n_uset_h set);
/**
* @brief Closes this set over the given attribute.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ustring_fold_case()
*/
-int i18n_uset_destroy_over (i18n_uset_h set, int32_t attributes);
+int i18n_uset_destroy_over(i18n_uset_h set, int32_t attributes);
/**
* @brief Removes all strings from this set.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_remove_all_strings (i18n_uset_h set);
+int i18n_uset_remove_all_strings(i18n_uset_h set);
/**
* @brief Returns true if the given #i18n_uset_h contains no characters and no
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_uset_is_empty (const i18n_uset_h set);
+i18n_ubool i18n_uset_is_empty(const i18n_uset_h set);
/**
* @brief Returns @c true if the given #i18n_uset_h contains the given @a character.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_uset_contains (const i18n_uset_h set, i18n_uchar32 character);
+i18n_ubool i18n_uset_contains(const i18n_uset_h set, i18n_uchar32 character);
/**
* @brief Returns true if the given #i18n_uset_h contains all characters c
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_uset_contains_range (const i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end);
+i18n_ubool i18n_uset_contains_range(const i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end);
/**
* @brief Returns true if the given #i18n_uset_h contains the given string.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_uset_contains_string (const i18n_uset_h set, const i18n_uchar *str, int32_t str_len);
+i18n_ubool i18n_uset_contains_string(const i18n_uset_h set, const i18n_uchar *str, int32_t str_len);
/**
* @brief Returns the index of the given @a character within this @a set, where
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_uset_index_of (const i18n_uset_h set, i18n_uchar32 character);
+int32_t i18n_uset_index_of(const i18n_uset_h set, i18n_uchar32 character);
/**
* @brief Returns the character at the given index within this set, where
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar32 i18n_uset_char_at (const i18n_uset_h set, int32_t char_index);
+i18n_uchar32 i18n_uset_char_at(const i18n_uset_h set, int32_t char_index);
/**
* @brief Returns the number of characters and strings contained in the given #i18n_uset_h.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_uset_size (const i18n_uset_h set);
+int32_t i18n_uset_size(const i18n_uset_h set);
/**
* @brief Returns the number of items in this set.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_uset_get_item_count (const i18n_uset_h set);
+int32_t i18n_uset_get_item_count(const i18n_uset_h set);
/**
* @brief Returns an item of this set.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_uset_get_item (const i18n_uset_h set, int32_t item_index, i18n_uchar32 *start, i18n_uchar32 *end, i18n_uchar *str, int32_t str_capacity);
+int32_t i18n_uset_get_item(const i18n_uset_h set, int32_t item_index, i18n_uchar32 *start, i18n_uchar32 *end, i18n_uchar *str, int32_t str_capacity);
/**
* @brief Returns true if set1 contains all the characters and strings of set2. It answers the question, 'Is set1 a superset of set2?'
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_uset_contains_all (const i18n_uset_h set1, const i18n_uset_h set2);
+i18n_ubool i18n_uset_contains_all(const i18n_uset_h set1, const i18n_uset_h set2);
/**
* @brief Returns true if this set contains all the characters of the given string.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_uset_contains_all_code_points (const i18n_uset_h set, const i18n_uchar *str, int32_t str_len);
+i18n_ubool i18n_uset_contains_all_code_points(const i18n_uset_h set, const i18n_uchar *str, int32_t str_len);
/**
* @brief Returns true if set1 contains none of the characters and strings of set2.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_uset_contains_none (const i18n_uset_h set1, const i18n_uset_h set2);
+i18n_ubool i18n_uset_contains_none(const i18n_uset_h set1, const i18n_uset_h set2);
/**
* @brief Returns true if set1 contains some of the characters and strings of set2.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_uset_contains_some (const i18n_uset_h set1, const i18n_uset_h set2);
+i18n_ubool i18n_uset_contains_some(const i18n_uset_h set1, const i18n_uset_h set2);
/**
* @brief Returns the length of the initial substring of the input string which
*
* @see #i18n_uset_span_condition_e
*/
-int32_t i18n_uset_span (const i18n_uset_h set, const i18n_uchar *str, int32_t length, i18n_uset_span_condition_e span_condition);
+int32_t i18n_uset_span(const i18n_uset_h set, const i18n_uchar *str, int32_t length, i18n_uset_span_condition_e span_condition);
/**
* @brief Returns the start of the trailing substring of the input string which
*
* @see #i18n_uset_span_condition_e
*/
-int32_t i18n_uset_span_back (const i18n_uset_h set, const i18n_uchar *str, int32_t length, i18n_uset_span_condition_e span_condition);
+int32_t i18n_uset_span_back(const i18n_uset_h set, const i18n_uchar *str, int32_t length, i18n_uset_span_condition_e span_condition);
/**
* @brief Returns the length of the initial substring of the input string which
*
* @see #i18n_uset_span_condition_e
*/
-int32_t i18n_uset_span_utf8 (const i18n_uset_h set, const char *str, int32_t length, i18n_uset_span_condition_e span_condition);
+int32_t i18n_uset_span_utf8(const i18n_uset_h set, const char *str, int32_t length, i18n_uset_span_condition_e span_condition);
/**
* @brief Returns the start of the trailing substring of the input string which
*
* @see #i18n_uset_span_condition_e
*/
-int32_t i18n_uset_span_back_utf8 (const i18n_uset_h set, const char *str, int32_t length, i18n_uset_span_condition_e span_condition);
+int32_t i18n_uset_span_back_utf8(const i18n_uset_h set, const char *str, int32_t length, i18n_uset_span_condition_e span_condition);
/**
* @brief Returns true if set1 contains all of the characters and strings
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_uset_equals (const i18n_uset_h set1, const i18n_uset_h set2);
+i18n_ubool i18n_uset_equals(const i18n_uset_h set1, const i18n_uset_h set2);
/*********************************************************************
* Serialized set API
* @exception #I18N_ERROR_INDEX_OUTOFBOUNDS If <code>n+2*m > 0x7FFF</code>
* @exception #I18N_ERROR_BUFFER_OVERFLOW If <code>n+2*m+(m != 0 ? 2 : 1) > dest_capacity</code>.
*/
-int32_t i18n_uset_serialize (const i18n_uset_h set, uint16_t *dest, int32_t dest_capacity);
+int32_t i18n_uset_serialize(const i18n_uset_h set, uint16_t *dest, int32_t dest_capacity);
/**
* @brief Given a serialized array, fill in the given serialized set object.
*
* @see #i18n_userialized_set_s
*/
-i18n_ubool i18n_uset_get_serialized_set (const uint16_t *src, int32_t src_length, i18n_userialized_set_s* fill_set);
+i18n_ubool i18n_uset_get_serialized_set(const uint16_t *src, int32_t src_length, i18n_userialized_set_s* fill_set);
/**
* @brief Sets the #i18n_userialized_set_s to contain the given @a character (and nothing else).
*
* @see #i18n_userialized_set_s
*/
-int i18n_uset_set_serialized_to_one (i18n_uchar32 character, i18n_userialized_set_s* fill_set);
+int i18n_uset_set_serialized_to_one(i18n_uchar32 character, i18n_userialized_set_s* fill_set);
/**
* @brief Returns @c true if the given #i18n_userialized_set_s contains the given @a character.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see #i18n_userialized_set_s
*/
-i18n_ubool i18n_uset_serialized_contains (const i18n_userialized_set_s* set, i18n_uchar32 character);
+i18n_ubool i18n_uset_serialized_contains(const i18n_userialized_set_s* set, i18n_uchar32 character);
/**
* @brief Returns the number of disjoint ranges of characters contained in
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see #i18n_userialized_set_s
*/
-int32_t i18n_uset_get_serialized_range_count (const i18n_userialized_set_s* set);
+int32_t i18n_uset_get_serialized_range_count(const i18n_userialized_set_s* set);
/**
* @brief Returns a range of characters contained in the given serialized set.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see #i18n_userialized_set_s
*/
-i18n_ubool i18n_uset_get_serialized_range (const i18n_userialized_set_s* set, int32_t range_index, i18n_uchar32 *p_start, i18n_uchar32 *p_end);
+i18n_ubool i18n_uset_get_serialized_range(const i18n_userialized_set_s* set, int32_t range_index, i18n_uchar32 *p_start, i18n_uchar32 *p_end);
/**
* @}
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_get_length ( const i18n_uchar *s );
+int32_t i18n_ustring_get_length(const i18n_uchar *s);
/**
* @brief Counts Unicode code points in the length #i18n_uchar code units of the string.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_count_char32 ( const i18n_uchar *s, int32_t length );
+int32_t i18n_ustring_count_char32(const i18n_uchar *s, int32_t length);
/**
* @brief Checks if the string contains more Unicode code points than a certain number.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_ustring_has_more_char32_than ( const i18n_uchar *s, int32_t length, int32_t number );
+i18n_ubool i18n_ustring_has_more_char32_than(const i18n_uchar *s, int32_t length, int32_t number);
/**
* @brief Concatenates two ustrings.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_cat ( i18n_uchar *dest, const i18n_uchar *src );
+i18n_uchar* i18n_ustring_cat(i18n_uchar *dest, const i18n_uchar *src);
/**
* @brief Concatenate two ustrings.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_cat_n ( i18n_uchar *dest, const i18n_uchar *src, int32_t n );
+i18n_uchar* i18n_ustring_cat_n(i18n_uchar *dest, const i18n_uchar *src, int32_t n);
/**
* @brief Finds the first occurrence of a substring in a string.
* @see i18n_ustring_find_first()
* @see i18n_ustring_find_last()
*/
-i18n_uchar* i18n_ustring_string ( const i18n_uchar *s, const i18n_uchar *sub_string );
+i18n_uchar* i18n_ustring_string(const i18n_uchar *s, const i18n_uchar *sub_string);
/**
* @brief Finds the first occurrence of a substring in a string.
* @see i18n_ustring_string()
* @see i18n_ustring_find_last()
*/
-i18n_uchar* i18n_ustring_find_first ( const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length );
+i18n_uchar* i18n_ustring_find_first(const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length);
/**
* @brief Finds the first occurrence of a BMP code point in a string.
* @see i18n_ustring_string()
* @see i18n_ustring_find_first()
*/
-i18n_uchar* i18n_ustring_char ( const i18n_uchar *s, i18n_uchar c );
+i18n_uchar* i18n_ustring_char(const i18n_uchar *s, i18n_uchar c);
/**
* @brief Finds the first occurrence of a code point in a string.
* @see i18n_ustring_string()
* @see i18n_ustring_find_first()
*/
-i18n_uchar* i18n_ustring_char32 ( const i18n_uchar *s, i18n_uchar32 c );
+i18n_uchar* i18n_ustring_char32(const i18n_uchar *s, i18n_uchar32 c);
/**
* @brief Finds the last occurrence of a substring in a string.
* @see i18n_ustring_find_first()
* @see i18n_ustring_find_last()
*/
-i18n_uchar* i18n_ustring_r_string ( const i18n_uchar *s, const i18n_uchar *sub_string );
+i18n_uchar* i18n_ustring_r_string(const i18n_uchar *s, const i18n_uchar *sub_string);
/**
* @brief Finds the last occurrence of a substring in a string.
* @see i18n_ustring_string()
* @see i18n_ustring_find_first()
*/
-i18n_uchar* i18n_ustring_find_last( const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length );
+i18n_uchar* i18n_ustring_find_last(const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length);
/**
* @brief Finds the last occurrence of a BMP code point in a string.
* @see i18n_ustring_string()
* @see i18n_ustring_find_first()
*/
-i18n_uchar* i18n_ustring_r_char ( const i18n_uchar *s, i18n_uchar c );
+i18n_uchar* i18n_ustring_r_char(const i18n_uchar *s, i18n_uchar c);
/**
* @brief Finds the last occurrence of a code point in a string.
* @see i18n_ustring_string()
* @see i18n_ustring_find_first()
*/
-i18n_uchar* i18n_ustring_r_char32 ( const i18n_uchar *s, i18n_uchar32 c );
+i18n_uchar* i18n_ustring_r_char32(const i18n_uchar *s, i18n_uchar32 c);
/**
* @brief Locates the first occurrence in the string of any of the characters in the string matchSet.
* @return A pointer to the character in @a string that matches one of the
* characters in @a match_set, or NULL if no such character is found.
*/
-i18n_uchar* i18n_ustring_pbrk ( const i18n_uchar *string, const i18n_uchar *match_set );
+i18n_uchar* i18n_ustring_pbrk(const i18n_uchar *string, const i18n_uchar *match_set);
/**
* @brief Returns the number of consecutive characters in string, beginning with the first, that do not occur somewhere in match_set.
* @return The number of initial characters in @a string that do not
* occur in @a match_set.
*/
-int32_t i18n_ustring_cspn ( const i18n_uchar *string, const i18n_uchar *match_set );
+int32_t i18n_ustring_cspn(const i18n_uchar *string, const i18n_uchar *match_set);
/**
* @brief Returns the number of consecutive characters in string, beginning with the first, that occur somewhere in match_set.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ustring_spn()
*/
-int32_t i18n_ustring_spn ( const i18n_uchar *string, const i18n_uchar *match_set );
+int32_t i18n_ustring_spn(const i18n_uchar *string, const i18n_uchar *match_set);
/**
* @brief The string tokenizer API allows an application to break a string into tokens.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_tokenizer_r ( i18n_uchar *src, const i18n_uchar *delim, i18n_uchar **save_state );
+i18n_uchar* i18n_ustring_tokenizer_r(i18n_uchar *src, const i18n_uchar *delim, i18n_uchar **save_state);
/**
* @brief Compares two Unicode strings for bitwise equality (code unit order).
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_compare ( const i18n_uchar *s1, const i18n_uchar *s2 );
+int32_t i18n_ustring_compare(const i18n_uchar *s1, const i18n_uchar *s2);
/**
* @brief Compare two Unicode strings in code point order.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_compare_code_point_order( const i18n_uchar *s1, const i18n_uchar *s2 );
+int32_t i18n_ustring_compare_code_point_order(const i18n_uchar *s1, const i18n_uchar *s2);
/**
* @brief Compare two Unicode strings (binary order).
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_compare_binary_order( const i18n_uchar *s1, int32_t length1, const i18n_uchar *s2, int32_t length2, i18n_ubool code_point_order );
+int32_t i18n_ustring_compare_binary_order(const i18n_uchar *s1, int32_t length1, const i18n_uchar *s2, int32_t length2, i18n_ubool code_point_order);
/**
* @brief Compare two strings case-insensitively using full case folding.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_case_compare_with_length( const i18n_uchar *s1, int32_t length1, const i18n_uchar *s2, int32_t length2, uint32_t options, i18n_error_code_e *error_code );
+int32_t i18n_ustring_case_compare_with_length(const i18n_uchar *s1, int32_t length1, const i18n_uchar *s2, int32_t length2, uint32_t options, i18n_error_code_e *error_code);
/**
* @brief Compare two ustrings for bitwise equality.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_compare_n( const i18n_uchar *s1, const i18n_uchar *s2, int32_t n );
+int32_t i18n_ustring_compare_n(const i18n_uchar *s1, const i18n_uchar *s2, int32_t n);
/**
* @brief Compare two Unicode strings in code point order.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_compare_n_code_point_order( const i18n_uchar *s1, const i18n_uchar *s2, int32_t n );
+int32_t i18n_ustring_compare_n_code_point_order(const i18n_uchar *s1, const i18n_uchar *s2, int32_t n);
/**
* @brief Compare two strings case-insensitively using full case folding.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_case_compare( const i18n_uchar *s1, const i18n_uchar *s2, uint32_t options );
+int32_t i18n_ustring_case_compare(const i18n_uchar *s1, const i18n_uchar *s2, uint32_t options);
/**
* @brief Compare two strings case-insensitively using full case folding.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_case_compare_n( const i18n_uchar *s1, const i18n_uchar *s2, int32_t n, uint32_t options );
+int32_t i18n_ustring_case_compare_n(const i18n_uchar *s1, const i18n_uchar *s2, int32_t n, uint32_t options);
/**
* @brief Compare two strings case-insensitively using full case folding.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_mem_case_compare( const i18n_uchar *s1, const i18n_uchar *s2, int32_t length, uint32_t options );
+int32_t i18n_ustring_mem_case_compare(const i18n_uchar *s1, const i18n_uchar *s2, int32_t length, uint32_t options);
/**
* @brief Copies a ustring. Adds a NULL terminator.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_copy ( i18n_uchar *dest, const i18n_uchar *src );
+i18n_uchar* i18n_ustring_copy(i18n_uchar *dest, const i18n_uchar *src);
/**
* @brief Copies a ustring.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_copy_n ( i18n_uchar *dest, const i18n_uchar *src, int32_t n );
+i18n_uchar* i18n_ustring_copy_n(i18n_uchar *dest, const i18n_uchar *src, int32_t n);
/**
* @brief Copies a byte string encoded in the default codepage to a ustring.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_copy_ua ( i18n_uchar *dest, const char *src );
+i18n_uchar* i18n_ustring_copy_ua(i18n_uchar *dest, const char *src);
/**
* @brief Copies a byte string encoded in the default codepage to a ustring.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_copy_ua_n ( i18n_uchar *dest, const char *src, int32_t n );
+i18n_uchar* i18n_ustring_copy_ua_n(i18n_uchar *dest, const char *src, int32_t n);
/**
* @brief Copies a ustring to a byte string encoded in the default codepage.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-char* i18n_ustring_copy_au ( char *dest, const i18n_uchar *src );
+char* i18n_ustring_copy_au(char *dest, const i18n_uchar *src);
/**
* @brief Copies a ustring to a byte string encoded in the default codepage.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-char* i18n_ustring_copy_au_n ( char *dest, const i18n_uchar *src, int32_t n );
+char* i18n_ustring_copy_au_n(char *dest, const i18n_uchar *src, int32_t n);
/**
* @brief Synonym for memcpy(), but with #i18n_uchar characters only.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_mem_copy ( i18n_uchar *dest, const i18n_uchar *src, int32_t count );
+i18n_uchar* i18n_ustring_mem_copy(i18n_uchar *dest, const i18n_uchar *src, int32_t count);
/**
* @brief Synonym for memmove(), but with #i18n_uchar characters only.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_mem_move ( i18n_uchar *dest, const i18n_uchar *src, int32_t count );
+i18n_uchar* i18n_ustring_mem_move(i18n_uchar *dest, const i18n_uchar *src, int32_t count);
/**
* @brief Initialize count characters of dest to c.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_mem_set ( i18n_uchar *dest, const i18n_uchar c, int32_t count );
+i18n_uchar* i18n_ustring_mem_set(i18n_uchar *dest, const i18n_uchar c, int32_t count);
/**
* @brief Compare the first count #i18n_uchar characters of each buffer.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_mem_compare ( const i18n_uchar *buf1, const i18n_uchar *buf2, int32_t count );
+int32_t i18n_ustring_mem_compare(const i18n_uchar *buf1, const i18n_uchar *buf2, int32_t count);
/**
* @brief Compare two Unicode strings in code point order.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_mem_compare_code_point_order ( const i18n_uchar *s1, const i18n_uchar *s2, int32_t count );
+int32_t i18n_ustring_mem_compare_code_point_order(const i18n_uchar *s1, const i18n_uchar *s2, int32_t count);
/**
* @brief Finds the first occurrence of a BMP code point in a string.
* @see i18n_ustring_mem_char32()
* @see i18n_ustring_find_first()
*/
-i18n_uchar* i18n_ustring_mem_char ( const i18n_uchar *s, i18n_uchar c, int32_t count );
+i18n_uchar* i18n_ustring_mem_char(const i18n_uchar *s, i18n_uchar c, int32_t count);
/**
* @brief Finds the first occurrence of a code point in a string.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_mem_char32 ( const i18n_uchar *s, i18n_uchar32 c, int32_t count );
+i18n_uchar* i18n_ustring_mem_char32(const i18n_uchar *s, i18n_uchar32 c, int32_t count);
/**
* @brief Finds the last occurrence of a BMP code point in a string.
* @see #i18n_ustring_mem_r_char32
* @see #i18n_ustring_find_last
*/
-i18n_uchar* i18n_ustring_mem_r_char ( const i18n_uchar *s, i18n_uchar c, int32_t count );
+i18n_uchar* i18n_ustring_mem_r_char(const i18n_uchar *s, i18n_uchar c, int32_t count);
/**
* @brief Finds the last occurrence of a code point in a string.
* @see #i18n_ustring_mem_r_char
* @see #i18n_ustring_find_last
*/
-i18n_uchar* i18n_ustring_mem_r_char32 ( const i18n_uchar *s, i18n_uchar32 c, int32_t count );
+i18n_uchar* i18n_ustring_mem_r_char32(const i18n_uchar *s, i18n_uchar32 c, int32_t count);
/**
* @brief Unescape a string of characters and write the resulting Unicode characters to the destination buffer.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ustring_unescape_at()
*/
-int32_t i18n_ustring_unescape ( const char *src, i18n_uchar *dest, int32_t dest_capacity );
+int32_t i18n_ustring_unescape(const char *src, i18n_uchar *dest, int32_t dest_capacity);
/**
* @brief Unescape a single sequence.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ustring_unescape()
*/
-i18n_uchar32 i18n_ustring_unescape_at ( i18n_ustring_unescape_char_at_cb char_at, int32_t *offset, int32_t length, void *context );
+i18n_uchar32 i18n_ustring_unescape_at(i18n_ustring_unescape_char_at_cb char_at, int32_t *offset, int32_t length, void *context);
/**
* @brief Uppercases the characters in a string.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_to_upper ( i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, const char *locale, i18n_error_code_e *error_code );
+int32_t i18n_ustring_to_upper(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, const char *locale, i18n_error_code_e *error_code);
/**
* @brief Lowercase the characters in a string.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_to_lower ( i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, const char *locale, i18n_error_code_e *error_code );
+int32_t i18n_ustring_to_lower(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, const char *locale, i18n_error_code_e *error_code);
/**
* @brief Titlecases a string.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_to_title ( i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, i18n_ubreak_iterator_s *title_iter,
- const char *locale, i18n_error_code_e *error_code );
+int32_t i18n_ustring_to_title(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, i18n_ubreak_iterator_s *title_iter,
+ const char *locale, i18n_error_code_e *error_code);
/**
* @brief Titlecases a string.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ustring_to_title()
*/
-int32_t i18n_ustring_to_title_new ( i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, i18n_ubreak_iterator_h title_iter, const char *locale);
+int32_t i18n_ustring_to_title_new(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, i18n_ubreak_iterator_h title_iter, const char *locale);
/**
* @brief Case-folds the characters in a string.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_fold_case ( i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, uint32_t options, i18n_error_code_e *error_code );
+int32_t i18n_ustring_fold_case(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, uint32_t options, i18n_error_code_e *error_code);
/**
* @brief Convert a UTF-16 string to a wchar_t string.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-wchar_t* i18n_ustring_to_WCS ( wchar_t *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code );
+wchar_t* i18n_ustring_to_WCS(wchar_t *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code);
/**
* @brief Convert a wchar_t string to UTF-16.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_from_WCS ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const wchar_t *src, int32_t src_len, i18n_error_code_e *error_code );
+i18n_uchar* i18n_ustring_from_WCS(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const wchar_t *src, int32_t src_len, i18n_error_code_e *error_code);
/**
* @brief Converts a UTF-16 string to UTF-8.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ustring_from_UTF8()
*/
-char* i18n_ustring_to_UTF8 ( char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code );
+char* i18n_ustring_to_UTF8(char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code);
/**
* @brief Converts a UTF-8 string to UTF-16.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_from_UTF8 ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code );
+i18n_uchar* i18n_ustring_from_UTF8(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code);
/**
* @brief Convert a UTF-16 string to UTF-8.
* @see i18n_ustring_to_UTF8()
* @see i18n_ustring_from_UTF8_with_sub()
*/
-char* i18n_ustring_to_UTF8_with_sub ( char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code );
+char* i18n_ustring_to_UTF8_with_sub(char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code);
/**
* @brief Convert a UTF-8 string to UTF-16.
* @see i18n_ustring_from_UTF8_lenient()
* @see i18n_ustring_to_UTF8_with_sub()
*/
-i18n_uchar* i18n_ustring_from_UTF8_with_sub ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_uchar32 sub_char,
- int32_t *num_substitutions, i18n_error_code_e *error_code );
+i18n_uchar* i18n_ustring_from_UTF8_with_sub(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_uchar32 sub_char,
+ int32_t *num_substitutions, i18n_error_code_e *error_code);
/**
* @brief Convert a UTF-8 string to UTF-16.
* @see i18n_ustring_to_UTF8_with_sub()
* @see i18n_ustring_from_UTF8_with_sub()
*/
-i18n_uchar* i18n_ustring_from_UTF8_lenient ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code );
+i18n_uchar* i18n_ustring_from_UTF8_lenient(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code);
/**
* @brief Convert a UTF-16 string to UTF-32.
* @see i18n_ustring_to_UTF32_with_sub()
* @see i18n_ustring_from_UTF32()
*/
-i18n_uchar32* i18n_ustring_to_UTF32 ( i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code );
+i18n_uchar32* i18n_ustring_to_UTF32(i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code);
/**
* @brief Convert a UTF-32 string to UTF-16.
* @see i18n_ustring_from_UTF32_with_sub()
* @see i18n_ustring_to_UTF32()
*/
-i18n_uchar* i18n_ustring_from_UTF32 ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_error_code_e *error_code );
+i18n_uchar* i18n_ustring_from_UTF32(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_error_code_e *error_code);
/**
* @brief Convert a UTF-16 string to UTF-32.
* @see i18n_ustring_to_UTF32()
* @see i18n_ustring_from_UTF32_with_sub()
*/
-i18n_uchar32* i18n_ustring_to_UTF32_with_sub ( i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len,
- i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code );
+i18n_uchar32* i18n_ustring_to_UTF32_with_sub(i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len,
+ i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code);
/**
* @brief Convert a UTF-32 string to UTF-16.
* @see i18n_ustring_from_UTF32()
* @see i18n_ustring_to_UTF32_with_sub()
*/
-i18n_uchar* i18n_ustring_from_UTF32_with_sub ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code );
+i18n_uchar* i18n_ustring_from_UTF32_with_sub(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code);
#ifdef __cplusplus
}
} while (0)
#define retex_if(expr, val, fmt, arg...) do { \
- if(expr) { \
+ if (expr) { \
ERR(fmt, ##arg); \
val; \
goto CATCH; \
#define ERR_MAPPING(ICU_ERROR, BASE_UTILS_ERROR) BASE_UTILS_ERROR = \
(i18n_error_code_e)_i18n_error_mapping((int)ICU_ERROR)
-int _i18n_error_mapping ( int err );
-int _i18n_error_mapping_reverse ( int err );
+int _i18n_error_mapping(int err);
+int _i18n_error_mapping_reverse(int err);
#ifdef __cplusplus
}
* @see i18n_timezone_create()
* @see i18n_timezone_create_gmt()
*/
-int i18n_timezone_create_unknown ( i18n_timezone_h *timezone );
+int i18n_timezone_create_unknown(i18n_timezone_h *timezone);
/**
* @brief The GMT (=UTC) time zone has a raw offset of zero and does not use daylight savings time.
* @retval #I18N_ERROR_NONE Successful
* @see i18n_timezone_create_unknown()
*/
-int i18n_timezone_create_gmt ( i18n_timezone_h *timezone );
+int i18n_timezone_create_gmt(i18n_timezone_h *timezone);
/**
* @brief Creates an i18n_timezone_h for the given timezone_id.
*
* @retval #I18N_ERROR_NONE Successful
*/
-int i18n_timezone_create ( i18n_timezone_h *timezone, const char *timezone_id );
+int i18n_timezone_create(i18n_timezone_h *timezone, const char *timezone_id);
/**
* @brief Destroys an i18n_timezone_h.
*
* @retval #I18N_ERROR_NONE Successful
*/
-int i18n_timezone_create_default ( i18n_timezone_h *timezone );
+int i18n_timezone_create_default(i18n_timezone_h *timezone);
/**
* @brief Sets the default time zone (i.e., what's returned by #i18n_timezone_create_default()) to be the specified time zone.
*
* @retval #I18N_ERROR_NONE Successful
*/
-int i18n_timezone_set_default( i18n_timezone_h timezone );
+int i18n_timezone_set_default(i18n_timezone_h timezone);
/**
* @brief Returns the timezone data version currently used by I18N.
#if !defined(U_WCHAR_IS_UTF16) && !defined(U_WCHAR_IS_UTF32)
# ifdef __STDC_ISO_10646__
-# if (U_SIZEOF_WCHAR_T==2)
+# if (U_SIZEOF_WCHAR_T == 2)
# define U_WCHAR_IS_UTF16
-# elif (U_SIZEOF_WCHAR_T==4)
+# elif (U_SIZEOF_WCHAR_T == 4)
# define U_WCHAR_IS_UTF32
# endif
# elif defined __UCS2__
-# if (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <= U_PF_OS400) && (U_SIZEOF_WCHAR_T==2)
+# if (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <= U_PF_OS400) && (U_SIZEOF_WCHAR_T == 2)
# define U_WCHAR_IS_UTF16
# endif
# elif defined(__UCS4__) || (U_PLATFORM == U_PF_OS400 && defined(__UTF32__))
-# if (U_SIZEOF_WCHAR_T==4)
+# if (U_SIZEOF_WCHAR_T == 4)
# define U_WCHAR_IS_UTF32
# endif
-# elif U_PLATFORM_IS_DARWIN_BASED || (U_SIZEOF_WCHAR_T==4 && U_PLATFORM_IS_LINUX_BASED)
+# elif U_PLATFORM_IS_DARWIN_BASED || (U_SIZEOF_WCHAR_T == 4 && U_PLATFORM_IS_LINUX_BASED)
# define U_WCHAR_IS_UTF32
# elif U_PLATFORM_HAS_WIN32_API
# define U_WCHAR_IS_UTF16
typedef UCHAR_TYPE i18n_uchar;
/* Not #elif U_HAVE_CHAR16_T -- because that is type-incompatible with pre-C++11 callers
typedef char16_t i18n_uchar; */
-#elif U_SIZEOF_WCHAR_T==2
+#elif U_SIZEOF_WCHAR_T == 2
typedef wchar_t i18n_uchar;
#elif defined(__CHAR16_TYPE__)
typedef __CHAR16_TYPE__ i18n_uchar;
* @brief Handle to struct representing a range of text containing a specific field.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef i18n_ufield_position_s* i18n_ufield_position_h;
+typedef i18n_ufield_position_s *i18n_ufield_position_h;
/**
* @brief Enumeration for the possible date/time format styles.
* @since_tizen 2.3.1
*/
-typedef enum{
+typedef enum {
I18N_UDISPCTX_TYPE_DIALECT_HANDLING, /**<Type to retrieve the dialect handling setting, e.g. UDISPCTX_STANDARD_NAMES or UDISPCTX_DIALECT_NAMES. */
I18N_UDISPCTX_TYPE_CAPITALIZATION, /**<Type to retrieve the capitalization context setting, e.g. UDISPCTX_CAPITALIZATION_NONE, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE, UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, etc. */
#ifndef U_HIDE_DRAFT_API
*
* @see i18n_ustring_unescape_at()
*/
-typedef i18n_uchar(* i18n_ustring_unescape_char_at_cb)(int32_t offset, void *context);
+typedef i18n_uchar(*i18n_ustring_unescape_char_at_cb)(int32_t offset, void *context);
/**
* @brief Option value for case folding: use default mappings defined in CaseFolding.txt.
I18N_TIMEZONE_DISPLAY_TYPE_LONG_GMT, /**< Selector for long display name derived from time zone offset */
I18N_TIMEZONE_DISPLAY_TYPE_SHORT_COMMONLY_USED, /**< Selector for short display name derived from the time zone's fallback name */
I18N_TIMEZONE_DISPLAY_TYPE_GENERIC_LOCATION /**< Selector for long display name derived from the time zone's fallback name */
-}i18n_timezone_display_type_e;
+} i18n_timezone_display_type_e;
/**
* @}
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ubrk_create_rules()
*/
-int i18n_ubrk_create (i18n_ubreak_iterator_type_e type, const char *locale, const i18n_uchar *text, int32_t text_length, i18n_ubreak_iterator_h *break_iter);
+int i18n_ubrk_create(i18n_ubreak_iterator_type_e type, const char *locale, const i18n_uchar *text, int32_t text_length, i18n_ubreak_iterator_h *break_iter);
/**
* @brief Opens a new #i18n_ubreak_iterator_h for locating text boundaries using specified breaking rules.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ubrk_create()
*/
-int i18n_ubrk_create_rules (const i18n_uchar *rules, int32_t rules_length, const i18n_uchar *text, int32_t text_length, i18n_ubreak_iterator_h *break_iter, i18n_uparse_error_s *parse_err);
+int i18n_ubrk_create_rules(const i18n_uchar *rules, int32_t rules_length, const i18n_uchar *text, int32_t text_length, i18n_ubreak_iterator_h *break_iter, i18n_uparse_error_s *parse_err);
/**
* @brief Thread safe cloning operation.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ubrk_safe_clone (const i18n_ubreak_iterator_h break_iter, void *stack_buffer, int32_t *p_buffer_size, i18n_ubreak_iterator_h *break_iter_clone);
+int i18n_ubrk_safe_clone(const i18n_ubreak_iterator_h break_iter, void *stack_buffer, int32_t *p_buffer_size, i18n_ubreak_iterator_h *break_iter_clone);
/**
* @brief Closes a #i18n_ubreak_iterator_h.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ubrk_destroy (i18n_ubreak_iterator_h break_iter);
+int i18n_ubrk_destroy(i18n_ubreak_iterator_h break_iter);
/**
* @brief Sets an existing iterator to point to a new piece of text.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ubrk_set_text (i18n_ubreak_iterator_h break_iter, const i18n_uchar *text, int32_t text_length);
+int i18n_ubrk_set_text(i18n_ubreak_iterator_h break_iter, const i18n_uchar *text, int32_t text_length);
/**
* @brief Determines the most recently-returned text boundary.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ubrk_current (const i18n_ubreak_iterator_h break_iter);
+int32_t i18n_ubrk_current(const i18n_ubreak_iterator_h break_iter);
/**
* @brief Advances the iterator to the boundary following the current boundary.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ubrk_previous()
*/
-int32_t i18n_ubrk_next (i18n_ubreak_iterator_h break_iter);
+int32_t i18n_ubrk_next(i18n_ubreak_iterator_h break_iter);
/**
* @brief Sets the iterator position to the boundary preceding the current boundary.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ubrk_next()
*/
-int32_t i18n_ubrk_previous (i18n_ubreak_iterator_h break_iter);
+int32_t i18n_ubrk_previous(i18n_ubreak_iterator_h break_iter);
/**
* @brief Sets the iterator position to zero, the start of the text being scanned.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ubrk_last()
*/
-int32_t i18n_ubrk_first (i18n_ubreak_iterator_h break_iter);
+int32_t i18n_ubrk_first(i18n_ubreak_iterator_h break_iter);
/**
* @brief Sets the iterator position to the index immediately <EM>beyond</EM> the last character in the text being scanned.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ubrk_first()
*/
-int32_t i18n_ubrk_last (i18n_ubreak_iterator_h break_iter);
+int32_t i18n_ubrk_last(i18n_ubreak_iterator_h break_iter);
/**
* @brief Sets the iterator position to the first boundary preceding the specified @c offset.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ubrk_following()
*/
-int32_t i18n_ubrk_preceding (i18n_ubreak_iterator_h break_iter, int32_t offset);
+int32_t i18n_ubrk_preceding(i18n_ubreak_iterator_h break_iter, int32_t offset);
/**
* @brief Advances the iterator to the first boundary following the specified @c offset.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ubrk_preceding()
*/
-int32_t i18n_ubrk_following (i18n_ubreak_iterator_h break_iter, int32_t offset);
+int32_t i18n_ubrk_following(i18n_ubreak_iterator_h break_iter, int32_t offset);
/**
* @brief Gets a locale for which text breaking information is available.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ubrk_count_available()
*/
-const char *i18n_ubrk_get_available (int32_t index);
+const char *i18n_ubrk_get_available(int32_t index);
/**
* @brief Determines how many locales have text breaking information available.
* @exception #I18N_ERROR_NONE Successful
* @see i18n_ubrk_get_available()
*/
-int32_t i18n_ubrk_count_available (void);
+int32_t i18n_ubrk_count_available(void);
/**
* @brief Returns true if the specfied position is a boundary position.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_ubrk_is_boundary (i18n_ubreak_iterator_h break_iter, int32_t offset);
+i18n_ubool i18n_ubrk_is_boundary(i18n_ubreak_iterator_h break_iter, int32_t offset);
/**
* @brief Returns the status from the break rule that determined the most recently
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ubrk_get_rule_status (i18n_ubreak_iterator_h break_iter);
+int32_t i18n_ubrk_get_rule_status(i18n_ubreak_iterator_h break_iter);
/**
* @brief Gets the statuses from the break rules that determined the most recently
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ubrk_get_rule_status_vec (i18n_ubreak_iterator_h break_iter, int32_t *fill_in_vec, int32_t capacity);
+int32_t i18n_ubrk_get_rule_status_vec(i18n_ubreak_iterator_h break_iter, int32_t *fill_in_vec, int32_t capacity);
/**
* @brief Returns the locale of the break iterator. You can choose between the valid and
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-const char *i18n_ubrk_get_locale_by_type (const i18n_ubreak_iterator_h break_iter, i18n_ulocale_data_locale_type_e type);
+const char *i18n_ubrk_get_locale_by_type(const i18n_ubreak_iterator_h break_iter, i18n_ulocale_data_locale_type_e type);
#ifdef __cplusplus
}
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_set_default_timezone ( const i18n_uchar *zone_id );
+int i18n_ucalendar_set_default_timezone(const i18n_uchar *zone_id);
/**
* @brief Gets the current date and time.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_get_now ( i18n_udate *date );
+int i18n_ucalendar_get_now(i18n_udate *date);
/**
* @brief Creates an #i18n_ucalendar_h.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @retval #I18N_ERROR_OUT_OF_MEMORY Out of memory
*/
-int i18n_ucalendar_create ( const i18n_uchar *zone_id, int32_t len, const char *locale, i18n_ucalendar_type_e type, i18n_ucalendar_h *calendar );
+int i18n_ucalendar_create(const i18n_uchar *zone_id, int32_t len, const char *locale, i18n_ucalendar_type_e type, i18n_ucalendar_h *calendar);
/**
* @brief Destroys an #i18n_ucalendar_h.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_destroy ( i18n_ucalendar_h calendar );
+int i18n_ucalendar_destroy(i18n_ucalendar_h calendar);
/**
* @brief Creates a copy of a #i18n_ucalendar_h.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_clone ( const i18n_ucalendar_h cal, i18n_ucalendar_h *identical_to_cal );
+int i18n_ucalendar_clone(const i18n_ucalendar_h cal, i18n_ucalendar_h *identical_to_cal);
/**
* @brief Gets the display name for a calendar's TimeZone.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_get_timezone_displayname ( const i18n_ucalendar_h calendar, i18n_ucalendar_displayname_type_e type, const char *locale, i18n_uchar *result, int32_t result_len, int32_t *buf_size_needed );
+int i18n_ucalendar_get_timezone_displayname(const i18n_ucalendar_h calendar, i18n_ucalendar_displayname_type_e type, const char *locale, i18n_uchar *result, int32_t result_len, int32_t *buf_size_needed);
/**
* @brief Determines if an #i18n_ucalendar_h is currently in daylight savings time.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_is_in_daylight_time ( const i18n_ucalendar_h calendar, i18n_ubool *is_in );
+int i18n_ucalendar_is_in_daylight_time(const i18n_ucalendar_h calendar, i18n_ubool *is_in);
/**
* @brief Sets the value of a field in a #i18n_ucalendar_h.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_set ( i18n_ucalendar_h cal, i18n_ucalendar_date_fields_e field, int32_t val );
+int i18n_ucalendar_set(i18n_ucalendar_h cal, i18n_ucalendar_date_fields_e field, int32_t val);
/**
* @brief Sets a numeric attribute associated with an #i18n_ucalendar_h.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_set_attribute ( i18n_ucalendar_h calendar, i18n_ucalendar_attribute_e attr, int32_t val );
+int i18n_ucalendar_set_attribute(i18n_ucalendar_h calendar, i18n_ucalendar_attribute_e attr, int32_t val);
/**
* @brief Gets a numeric attribute associated with an i18n_ucalendar.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_get_attribute ( i18n_ucalendar_h calendar, i18n_ucalendar_attribute_e attr, int32_t *val);
+int i18n_ucalendar_get_attribute(i18n_ucalendar_h calendar, i18n_ucalendar_attribute_e attr, int32_t *val);
/**
* @brief Gets a calendar's current time in milliseconds.
* @see i18n_ucalendar_set_milliseconds()
* @see i18n_ucalendar_set_date_time()
*/
-int i18n_ucalendar_get_milliseconds( const i18n_ucalendar_h calendar, i18n_udate *date );
+int i18n_ucalendar_get_milliseconds(const i18n_ucalendar_h calendar, i18n_udate *date);
/**
* @brief Sets a calendar's current time in milliseconds.
* @see i18n_ucalendar_get_milliseconds()
* @see i18n_ucalendar_set_date_time()
*/
-int i18n_ucalendar_set_milliseconds ( i18n_ucalendar_h calendar, i18n_udate milliseconds );
+int i18n_ucalendar_set_milliseconds(i18n_ucalendar_h calendar, i18n_udate milliseconds);
/**
* @brief Sets a calendar's current date.
* @see i18n_ucalendar_get_milliseconds()
* @see i18n_ucalendar_set_milliseconds()
*/
-int i18n_ucalendar_set_date_time ( i18n_ucalendar_h calendar, int32_t year, int32_t month, int32_t date, int32_t hour, int32_t min, int32_t sec );
+int i18n_ucalendar_set_date_time(i18n_ucalendar_h calendar, int32_t year, int32_t month, int32_t date, int32_t hour, int32_t min, int32_t sec);
/**
* @brief Returns @c true if two #i18n_ucalendar_h calendars are equivalent.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_is_equivalent_to ( const i18n_ucalendar_h calendar1, const i18n_ucalendar_h calendar2, i18n_ubool *equiv );
+int i18n_ucalendar_is_equivalent_to(const i18n_ucalendar_h calendar1, const i18n_ucalendar_h calendar2, i18n_ubool *equiv);
/**
* @brief Adds a specified signed amount to a particular field in a #i18n_ucalendar_h.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_add ( i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t amount );
+int i18n_ucalendar_add(i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t amount);
/**
* @brief Gets the current value of a field from an #i18n_ucalendar_h.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_get ( const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t *val );
+int i18n_ucalendar_get(const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t *val);
// Newly Added APIs
*
* @return The date difference for the specified field.
*/
-int32_t i18n_ucalendar_get_field_difference ( i18n_ucalendar_h calendar, i18n_udate target, i18n_ucalendar_date_fields_e field, i18n_error_code_e *status );
+int32_t i18n_ucalendar_get_field_difference(i18n_ucalendar_h calendar, i18n_udate target, i18n_ucalendar_date_fields_e field, i18n_error_code_e *status);
/**
* @brief Creates an enumeration over system time zone IDs with the given filter conditions.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_timezone_id_enumeration_create ( i18n_system_timezone_type_e zone_type, const char *region, const int32_t *raw_offset, i18n_uenumeration_h *enumeration);
+int i18n_ucalendar_timezone_id_enumeration_create(i18n_system_timezone_type_e zone_type, const char *region, const int32_t *raw_offset, i18n_uenumeration_h *enumeration);
/**
* @brief Creates an enumeration over all time zones.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_timezones_create (i18n_uenumeration_h * enumeration);
+int i18n_ucalendar_timezones_create(i18n_uenumeration_h * enumeration);
/**
* @brief Creates an enumeration over all time zones associated with the given country.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_country_timezones_create (const char *country, i18n_uenumeration_h * enumeration);
+int i18n_ucalendar_country_timezones_create(const char *country, i18n_uenumeration_h * enumeration);
/**
* @brief Returns the default time zone.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid parameter
*/
-int32_t i18n_ucalendar_get_default_timezone (i18n_uchar *result, int32_t result_capacity);
+int32_t i18n_ucalendar_get_default_timezone(i18n_uchar *result, int32_t result_capacity);
/**
* @brief Sets the TimeZone used by a #i18n_ucalendar_h.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_set_timezone ( i18n_ucalendar_h calendar, const i18n_uchar *zone_id, int32_t length );
+int i18n_ucalendar_set_timezone(i18n_ucalendar_h calendar, const i18n_uchar *zone_id, int32_t length);
/**
* @brief Gets the ID of the calendar's time zone.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ucalendar_get_timezone_id (const i18n_ucalendar_h calendar, i18n_uchar *result, int32_t result_length);
+int32_t i18n_ucalendar_get_timezone_id(const i18n_ucalendar_h calendar, i18n_uchar *result, int32_t result_length);
/**
* @brief Sets the Gregorian Calendar change date.
*
* @see i18n_ucalendar_get_gregorian_change()
*/
-int i18n_ucalendar_set_gregorian_change ( i18n_ucalendar_h calendar, i18n_udate date);
+int i18n_ucalendar_set_gregorian_change(i18n_ucalendar_h calendar, i18n_udate date);
/**
* @brief Gets the Gregorian Calendar change date.
*
* @see i18n_ucalendar_set_gregorian_change()
*/
-int i18n_ucalendar_get_gregorian_change (const i18n_ucalendar_h calendar, i18n_udate *date);
+int i18n_ucalendar_get_gregorian_change(const i18n_ucalendar_h calendar, i18n_udate *date);
/**
* @brief Gets a locale for which calendars are available.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid parameter
* @see i18n_ucalendar_count_available()
*/
-const char * i18n_ucalendar_get_available (int32_t locale_index);
+const char * i18n_ucalendar_get_available(int32_t locale_index);
/**
* @brief Determines how many locales have calendars available.
* @exception #I18N_ERROR_NONE Successful
* @see i18n_ucalendar_get_available()
*/
-int32_t i18n_ucalendar_count_available (void);
+int32_t i18n_ucalendar_count_available(void);
/**
* @brief Sets a calendar's current date.
* @see i18n_ucalendar_set_milliseconds()
* @see i18n_ucalendar_set_date_time()
*/
-int i18n_ucalendar_set_date (i18n_ucalendar_h calendar, int32_t year, int32_t month, int32_t date);
+int i18n_ucalendar_set_date(i18n_ucalendar_h calendar, int32_t year, int32_t month, int32_t date);
/**
* @brief Adds a specified signed amount to a particular field in a #i18n_ucalendar_h.
* @remarks #I18N_UCALENDAR_ZONE_OFFSET and #I18N_UCALENDAR_DST_OFFSET are not supported by this function.
* @see i18n_ucalendar_add()
*/
-int i18n_ucalendar_roll (i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t amount);
+int i18n_ucalendar_roll(i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, int32_t amount);
/**
* @brief Determines if a field in a #i18n_ucalendar_h is set.
* @see i18n_ucalendar_clear()
*
*/
-i18n_ubool i18n_ucalendar_is_set (const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field);
+i18n_ubool i18n_ucalendar_is_set(const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field);
/**
* @brief Clears a field in a #i18n_ucalendar_h.
* @see i18n_ucalendar_clear()
*
*/
-int i18n_ucalendar_clear_field (i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field);
+int i18n_ucalendar_clear_field(i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field);
/**
* @brief Clears all fields in a #i18n_ucalendar_h.
* @see i18n_ucalendar_clear_field()
*
*/
-int i18n_ucalendar_clear (i18n_ucalendar_h calendar);
+int i18n_ucalendar_clear(i18n_ucalendar_h calendar);
/**
* @brief Determines a limit for a field in an #i18n_ucalendar_h.
*
* @return The requested value.
*/
-int32_t i18n_ucalendar_get_limit (const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, i18n_ucalendar_limit_type_e type);
+int32_t i18n_ucalendar_get_limit(const i18n_ucalendar_h calendar, i18n_ucalendar_date_fields_e field, i18n_ucalendar_limit_type_e type);
/**
* @brief Gets the locale for this @c calendar object.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-const char *i18n_ucalendar_get_locale_by_type (const i18n_ucalendar_h calendar, i18n_ulocale_data_locale_type_e type);
+const char *i18n_ucalendar_get_locale_by_type(const i18n_ucalendar_h calendar, i18n_ulocale_data_locale_type_e type);
/**
* @brief Returns the timezone data version currently used by ICU.
* @return The version string, such as "2007f".
* @exception #I18N_ERROR_NONE Successful
*/
-const char *i18n_ucalendar_get_tz_data_version (void);
+const char *i18n_ucalendar_get_tz_data_version(void);
/**
* @brief Returns the canonical system timezone ID or the normalized custom time zone ID for the given time zone ID.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ucalendar_get_canonical_timezone_id (const i18n_uchar *id, int32_t length, i18n_uchar *result, int32_t result_capacity, i18n_ubool *is_system_id);
+int32_t i18n_ucalendar_get_canonical_timezone_id(const i18n_uchar *id, int32_t length, i18n_uchar *result, int32_t result_capacity, i18n_ubool *is_system_id);
/**
* @brief Gets the resource keyword value string designating the calendar type for the #i18n_ucalendar_h.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-const char *i18n_ucalendar_get_type (const i18n_ucalendar_h calendar);
+const char *i18n_ucalendar_get_type(const i18n_ucalendar_h calendar);
/**
* @brief Given a key and a locale, returns an array of string values in a preferred order that would make a difference.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_get_keyword_values_for_locale (const char *key, const char *locale, i18n_ubool commonly_used, i18n_uenumeration_h *enumeration);
+int i18n_ucalendar_get_keyword_values_for_locale(const char *key, const char *locale, i18n_ubool commonly_used, i18n_uenumeration_h *enumeration);
/**
* @brief Returns whether the given day of the week is a weekday, a weekend day,
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucalendar_get_day_of_week_type (const i18n_ucalendar_h calendar, i18n_ucalendar_days_of_week_e day_of_week, i18n_ucalendar_weekday_type_e *weekday);
+int i18n_ucalendar_get_day_of_week_type(const i18n_ucalendar_h calendar, i18n_ucalendar_days_of_week_e day_of_week, i18n_ucalendar_weekday_type_e *weekday);
/**
* @brief Returns the time during the day at which the weekend begins or ends in this calendar system.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ucalendar_get_weekend_transition (const i18n_ucalendar_h calendar, i18n_ucalendar_days_of_week_e day_of_week);
+int32_t i18n_ucalendar_get_weekend_transition(const i18n_ucalendar_h calendar, i18n_ucalendar_days_of_week_e day_of_week);
/**
* @brief Returns @c true if the given #i18n_udate is in the weekend in this calendar system.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_ucalendar_is_weekend (i18n_ucalendar_h calendar, i18n_udate date);
+i18n_ubool i18n_ucalendar_is_weekend(i18n_ucalendar_h calendar, i18n_udate date);
/**
* @brief Get the #i18n_udate for the next/previous time zone transition relative
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_ucalendar_get_timezone_transition_date (const i18n_ucalendar_h calendar, i18n_utimezone_transition_type_e type, i18n_udate *transition);
+i18n_ubool i18n_ucalendar_get_timezone_transition_date(const i18n_ucalendar_h calendar, i18n_utimezone_transition_type_e type, i18n_udate *transition);
/**
* @}
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uchar_get_int_property_value ( i18n_uchar32 c, i18n_uchar_uproperty_e which, int32_t *property_val );
+int i18n_uchar_get_int_property_value(i18n_uchar32 c, i18n_uchar_uproperty_e which, int32_t *property_val);
/**
* @brief Gets the Unicode allocation block that contains the character.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uchar_get_ublock_code ( i18n_uchar32 c, i18n_uchar_ublock_code_e *block_val );
+int i18n_uchar_get_ublock_code(i18n_uchar32 c, i18n_uchar_ublock_code_e *block_val);
#ifdef __cplusplus
}
int ret = I18N_ERROR_NONE;
int buf_01_len = 0, buf_02_len = 0;
- for ( i = 0; i < sizeof( src ) / sizeof( src[0] ); i++ ) {
- dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i] );
+ for (i = 0; i < sizeof(src) / sizeof(src[0]); i++) {
+ dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i]);
} // cat banana airplane
// creates a collator
ret = i18n_ucollator_create( "en_US", &coll );
// compares and sorts in ascending order
- if ( ret == I18N_ERROR_NONE ) {
- i18n_ucollator_set_strength( coll, I18N_UCOLLATOR_TERTIARY );
- for ( i = 0; i < 2; i++ ) {
- for ( j = 0; j < 2 - i; j++ ) {
- i18n_ustring_copy_ua( buf_01, src[j] );
- i18n_ustring_copy_ua( buf_02, src[j+1] );
- i18n_ustring_get_length( buf_01, &buf_01_len );
- i18n_ustring_get_length( buf_02, &buf_02_len );
+ if (ret == I18N_ERROR_NONE) {
+ i18n_ucollator_set_strength(coll, I18N_UCOLLATOR_TERTIARY);
+ for (i = 0; i < 2; i++) {
+ for (j = 0; j < 2 - i; j++) {
+ i18n_ustring_copy_ua(buf_01, src[j]);
+ i18n_ustring_copy_ua(buf_02, src[j+1]);
+ i18n_ustring_get_length(buf_01, &buf_01_len);
+ i18n_ustring_get_length(buf_02, &buf_02_len);
// compares buf_01 with buf_02
- i18n_ucollator_str_collator( coll, buf_01, buf_01_len, buf_02, buf_02_len, &result );
- if ( result == I18N_UCOLLATOR_GREATER ) {
+ i18n_ucollator_str_collator(coll, buf_01, buf_01_len, buf_02, buf_02_len, &result);
+ if (result == I18N_UCOLLATOR_GREATER) {
tmp = src[j];
src[j] = src[j+1];
src[j+1] = tmp;
// destroys the collator
i18n_ucollator_destroy( coll ); // deallocate memory for collator
- for ( i = 0; i < sizeof( src ) / sizeof( src[0] ); i++ ) {
- dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i] );
+ for (i = 0; i < sizeof(src) / sizeof(src[0]); i++) {
+ dlog_print(DLOG_INFO, LOG_TAG, "%s\n", src[i]);
} // ariplane banana cat
* @endcode
*/
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ucollator_destroy()
*/
-int i18n_ucollator_create ( const char *locale, i18n_ucollator_h *collator );
+int i18n_ucollator_create(const char *locale, i18n_ucollator_h *collator);
/**
* @brief Closes a i18n_ucollator_h.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ucollator_create()
*/
-int i18n_ucollator_destroy ( i18n_ucollator_h collator );
+int i18n_ucollator_destroy(i18n_ucollator_h collator);
/**
* @brief Compares two strings.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ucollator_equal()
*/
-int i18n_ucollator_str_collator ( const i18n_ucollator_h collator, const i18n_uchar *src, int32_t src_len, const i18n_uchar *target, int32_t target_len, i18n_ucollator_result_e *result );
+int i18n_ucollator_str_collator(const i18n_ucollator_h collator, const i18n_uchar *src, int32_t src_len, const i18n_uchar *target, int32_t target_len, i18n_ucollator_result_e *result);
/**
* @brief Compares two strings for equality.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ucollator_str_collator()
*/
-int i18n_ucollator_equal ( const i18n_ucollator_h collator, const i18n_uchar *src, int32_t src_len, const i18n_uchar *target, int32_t target_len, i18n_ubool *equal );
+int i18n_ucollator_equal(const i18n_ucollator_h collator, const i18n_uchar *src, int32_t src_len, const i18n_uchar *target, int32_t target_len, i18n_ubool *equal);
/**
* @brief Sets the collation strength used in a collator.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucollator_set_strength ( i18n_ucollator_h collator, i18n_ucollator_strength_e strength );
+int i18n_ucollator_set_strength(i18n_ucollator_h collator, i18n_ucollator_strength_e strength);
/**
* @brief Sets a universal attribute setter.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ucollator_set_attribute ( i18n_ucollator_h collator, i18n_ucollator_attribute_e attr, i18n_ucollator_attribute_value_e val );
+int i18n_ucollator_set_attribute(i18n_ucollator_h collator, i18n_ucollator_attribute_e attr, i18n_ucollator_attribute_value_e val);
#ifdef __cplusplus
}
// creates new i18n_udate_format_h to format dates and times
ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_KR, -1, bestPattern, -1, &formatter_KR);
- if ( ret != I18N_ERROR_NONE ) {
+ if (ret != I18N_ERROR_NONE) {
dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n");
}
if (!formatter_KR) {
dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n");
}
ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_LA, -1, bestPattern, -1, &formatter_LA);
- if ( ret != I18N_ERROR_NONE ) {
+ if (ret != I18N_ERROR_NONE) {
dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n");
}
if (!formatter_LA) {
dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n");
}
ret = i18n_udate_create(I18N_UDATE_PATTERN , I18N_UDATE_PATTERN , locale, utf16_timezone_SaoPaulo, -1, bestPattern, -1, &formatter_SaoPaulo);
- if ( ret != I18N_ERROR_NONE ) {
+ if (ret != I18N_ERROR_NONE) {
dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n");
}
if (!formatter_LA) {
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udate_create ( i18n_udate_format_style_e time_style, i18n_udate_format_style_e date_style, const char *locale, const i18n_uchar *tz_id, int32_t tz_id_len, const i18n_uchar *pattern, int pattern_len, i18n_udate_format_h *format );
+int i18n_udate_create(i18n_udate_format_style_e time_style, i18n_udate_format_style_e date_style, const char *locale, const i18n_uchar *tz_id, int32_t tz_id_len, const i18n_uchar *pattern, int pattern_len, i18n_udate_format_h *format);
/**
* @brief Destroys an #i18n_udate_format_h.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udate_destroy ( i18n_udate_format_h format );
+int i18n_udate_destroy(i18n_udate_format_h format);
/**
* @brief Formats a date using an #i18n_udate_format_h.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udate_format_date ( const i18n_udate_format_h format, i18n_udate date_to_format, i18n_uchar *result, int32_t result_len, i18n_ufield_position_h pos, int32_t *buf_size_needed );
+int i18n_udate_format_date(const i18n_udate_format_h format, i18n_udate date_to_format, i18n_uchar *result, int32_t result_len, i18n_ufield_position_h pos, int32_t *buf_size_needed);
// Newly Added APIs
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udate_to_calendar_date_field ( i18n_udate_format_field_e field, i18n_ucalendar_date_fields_e *date_field_type );
+int i18n_udate_to_calendar_date_field(i18n_udate_format_field_e field, i18n_ucalendar_date_fields_e *date_field_type);
/**
* @brief Creates a copy of an #i18n_udate_format_h.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udate_clone ( const i18n_udate_format_h format, i18n_udate_format_h *format_clone );
+int i18n_udate_clone(const i18n_udate_format_h format, i18n_udate_format_h *format_clone);
/**
* @brief Parses a string into an date/time using an #i18n_udate_format_h.
*
* @see i18n_udate_format_date()
*/
-int i18n_udate_parse ( const i18n_udate_format_h format, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, i18n_udate *parsed_date );
+int i18n_udate_parse(const i18n_udate_format_h format, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, i18n_udate *parsed_date);
/**
* @brief Parses a string into an date/time using an #i18n_udate_format_h.
*
* @see i18n_udate_format_date()
*/
-int i18n_udate_parse_calendar (const i18n_udate_format_h format, i18n_ucalendar_h *calendar, const i18n_uchar *text,
- int32_t text_length, int32_t *parse_pos );
+int i18n_udate_parse_calendar(const i18n_udate_format_h format, i18n_ucalendar_h *calendar, const i18n_uchar *text,
+ int32_t text_length, int32_t *parse_pos);
/**
* @brief Determines if an #i18n_udate_format_h will perform lenient parsing.
*
* @see i18n_udate_set_lenient()
*/
-i18n_ubool i18n_udate_is_lenient ( const i18n_udate_format_h format );
+i18n_ubool i18n_udate_is_lenient(const i18n_udate_format_h format);
/**
* @brief Specifies whether an #i18n_udate_format_h will perform lenient parsing.
*
* @see i18n_udate_is_lenient()
*/
-int i18n_udate_set_lenient ( i18n_udate_format_h format, i18n_ubool is_lenient );
+int i18n_udate_set_lenient(i18n_udate_format_h format, i18n_ubool is_lenient);
/**
* @brief Gets the #i18n_ucalendar_h associated with an #i18n_udate_format_h.
*
* @see i18n_udate_set_calendar()
*/
-int i18n_udate_get_calendar ( const i18n_udate_format_h format, i18n_ucalendar_h *calendar);
+int i18n_udate_get_calendar(const i18n_udate_format_h format, i18n_ucalendar_h *calendar);
/**
* @brief Sets the #i18n_ucalendar_h associated with an #i18n_udate_format_h.
*
* @see i18n_udate_get_calendar()
*/
-int i18n_udate_set_calendar ( i18n_udate_format_h format, const i18n_ucalendar_h calendar_to_set );
+int i18n_udate_set_calendar(i18n_udate_format_h format, const i18n_ucalendar_h calendar_to_set);
/**
* @brief Gets the #i18n_unumber_format_h associated with an #i18n_udate_format_h.
*
* @see i18n_udate_set_number_format()
*/
-int i18n_udate_get_number_format ( const i18n_udate_format_h format, i18n_unumber_format_h *number_format );
+int i18n_udate_get_number_format(const i18n_udate_format_h format, i18n_unumber_format_h *number_format);
/**
* @brief Sets the #i18n_unumber_format_h associated with an #i18n_udate_format_h.
*
* @see i18n_udate_get_number_format()
*/
-int i18n_udate_set_number_format ( i18n_udate_format_h format, const i18n_unumber_format_h number_format_to_set );
+int i18n_udate_set_number_format(i18n_udate_format_h format, const i18n_unumber_format_h number_format_to_set);
/**
* @brief Gets a locale for which date/time formatting patterns are available.
* @see i18n_udate_count_available()
*/
-const char *i18n_udate_get_available ( int32_t locale_index );
+const char *i18n_udate_get_available(int32_t locale_index);
/**
* @brief Determines how many locales have date/time formatting patterns available.
*
* @see i18n_udate_get_available()
*/
-int32_t i18n_udate_count_available ( void );
+int32_t i18n_udate_count_available(void);
/**
* @brief Gets the year relative to which all 2-digit years are interpreted.
*
* @see i18n_udate_set_2digit_year_start()
*/
-int i18n_udate_get_2digit_year_start ( const i18n_udate_format_h format, i18n_udate *year );
+int i18n_udate_get_2digit_year_start(const i18n_udate_format_h format, i18n_udate *year);
/**
* @brief Sets the year relative to which all 2-digit years will be interpreted.
*
* @see i18n_udate_get_2digit_year_start()
*/
-int i18n_udate_set_2digit_year_start ( i18n_udate_format_h format, i18n_udate date );
+int i18n_udate_set_2digit_year_start(i18n_udate_format_h format, i18n_udate date);
/**
* @brief Extracts the pattern from an #i18n_udate_format_h.
*
* @see i18n_udate_apply_pattern()
*/
-int32_t i18n_udate_to_pattern ( const i18n_udate_format_h format, i18n_ubool localized, i18n_uchar *result,
- int32_t result_length );
+int32_t i18n_udate_to_pattern(const i18n_udate_format_h format, i18n_ubool localized, i18n_uchar *result,
+ int32_t result_length);
/**
* @brief Sets the pattern used by an #i18n_udate_format_h.
*
* @see i18n_udate_to_pattern()
*/
-int i18n_udate_apply_pattern ( i18n_udate_format_h format, i18n_ubool localized, const i18n_uchar *pattern,
- int32_t pattern_length );
+int i18n_udate_apply_pattern(i18n_udate_format_h format, i18n_ubool localized, const i18n_uchar *pattern,
+ int32_t pattern_length);
/**
* @brief Gets the symbols associated with an #i18n_udate_format_h.
* @see i18n_udate_count_symbols()
* @see #i18n_udate_set_symbols()
*/
-int32_t i18n_udate_get_symbols ( const i18n_udate_format_h format, i18n_udate_format_symbol_type_e type, int32_t symbol_index,
- i18n_uchar *result, int32_t result_length );
+int32_t i18n_udate_get_symbols(const i18n_udate_format_h format, i18n_udate_format_symbol_type_e type, int32_t symbol_index,
+ i18n_uchar *result, int32_t result_length);
/**
* @brief Counts the number of particular symbols for an #i18n_udate_format_h.
* @see i18n_udate_get_symbols()
* @see #i18n_udate_set_symbols()
*/
-int32_t i18n_udate_count_symbols ( const i18n_udate_format_h format, i18n_udate_format_symbol_type_e type );
+int32_t i18n_udate_count_symbols(const i18n_udate_format_h format, i18n_udate_format_symbol_type_e type);
/**
* @brief Sets the symbols associated with an #i18n_udate_format_h.
* @see i18n_udate_count_symbols()
* @see #i18n_udate_get_symbols()
*/
-int i18n_udate_set_symbols ( i18n_udate_format_h format, i18n_udate_format_symbol_type_e type, int32_t symbol_index,
- i18n_uchar *value, int32_t value_length );
+int i18n_udate_set_symbols(i18n_udate_format_h format, i18n_udate_format_symbol_type_e type, int32_t symbol_index,
+ i18n_uchar *value, int32_t value_length);
/**
* @brief Gets the locale for this date format object.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-const char * i18n_udate_get_locale_by_type ( const i18n_udate_format_h format, i18n_ulocale_data_locale_type_e type );
+const char * i18n_udate_get_locale_by_type(const i18n_udate_format_h format, i18n_ulocale_data_locale_type_e type);
/**
* @brief Sets a particular #i18n_udisplay_context_e value in the formatter, such as #I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_STANDALONE.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udate_set_context ( i18n_udate_format_h format, i18n_udisplay_context_e value );
+int i18n_udate_set_context(i18n_udate_format_h format, i18n_udisplay_context_e value);
/**
// creates new i18n_udate_format to format dates and times
ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_KR, -1, bestPattern, -1, &formatter_KR);
- if ( ret != I18N_ERROR_NONE ) {
+ if (ret != I18N_ERROR_NONE) {
dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n");
}
if (!formatter_KR) {
dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n");
}
ret = i18n_udate_create(I18N_UDATE_FULL , I18N_UDATE_FULL , locale, utf16_timezone_LA, -1, bestPattern, -1, &formatter_LA);
- if ( ret != I18N_ERROR_NONE ) {
+ if (ret != I18N_ERROR_NONE) {
dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n");
}
if (!formatter_LA) {
dlog_print(DLOG_INFO, LOG_TAG, "formatter is NULL\n");
}
ret = i18n_udate_create(I18N_UDATE_PATTERN , I18N_UDATE_PATTERN , locale, utf16_timezone_SaoPaulo, -1, bestPattern, -1, &formatter_SaoPaulo);
- if ( ret != I18N_ERROR_NONE ) {
+ if (ret != I18N_ERROR_NONE) {
dlog_print(DLOG_INFO, LOG_TAG, "i18n_udate_create failed !!! \n");
}
if (!formatter_LA) {
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udatepg_create ( const char *locale, i18n_udatepg_h *dtpg );
+int i18n_udatepg_create(const char *locale, i18n_udatepg_h *dtpg);
/**
* @brief Destroys a generator.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udatepg_destroy ( i18n_udatepg_h dtpg );
+int i18n_udatepg_destroy(i18n_udatepg_h dtpg);
/**
* @brief Gets the best pattern matching the input skeleton.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @retval #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer
*/
-int i18n_udatepg_get_best_pattern ( i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t len, i18n_uchar *best_pattern, int32_t capacity, int32_t *best_pattern_len );
+int i18n_udatepg_get_best_pattern(i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t len, i18n_uchar *best_pattern, int32_t capacity, int32_t *best_pattern_len);
// Newly Added APIs
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udatepg_create_empty (i18n_udatepg_h *dtpg);
+int i18n_udatepg_create_empty(i18n_udatepg_h *dtpg);
/**
* @brief Creates a copy of a generator.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udatepg_clone ( const i18n_udatepg_h dtpg, i18n_udatepg_h * dtpg_clone);
+int i18n_udatepg_clone(const i18n_udatepg_h dtpg, i18n_udatepg_h * dtpg_clone);
/**
* @brief Gets the best pattern matching the input @a skeleton.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_udatepg_get_best_pattern_with_options ( i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t length,
- i18n_udatepg_date_time_pattern_match_options_e options, i18n_uchar *best_pattern, int32_t capacity );
+int32_t i18n_udatepg_get_best_pattern_with_options(i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t length,
+ i18n_udatepg_date_time_pattern_match_options_e options, i18n_uchar *best_pattern, int32_t capacity);
/**
* @brief Gets a unique skeleton from a given pattern. For example, both "MMM-dd" and "dd/MMM" produce the skeleton "MMMdd".
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_udatepg_get_skeleton ( i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t length, i18n_uchar *skeleton, int32_t capacity );
+int32_t i18n_udatepg_get_skeleton(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t length, i18n_uchar *skeleton, int32_t capacity);
/**
* @brief Gets a unique base skeleton from a given pattern.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_udatepg_get_base_skeleton ( i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t length, i18n_uchar *base_skeleton, int32_t capacity );
+int32_t i18n_udatepg_get_base_skeleton(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t length, i18n_uchar *base_skeleton, int32_t capacity);
/**
* @brief Adds a pattern to the generator.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_udatepg_add_pattern ( i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, i18n_ubool override, i18n_uchar *conflicting_pattern, int32_t capacity, i18n_udatepg_date_time_pattern_conflict_e * conflict_status );
+int32_t i18n_udatepg_add_pattern(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length, i18n_ubool override, i18n_uchar *conflicting_pattern, int32_t capacity, i18n_udatepg_date_time_pattern_conflict_e * conflict_status);
/**
* @brief An append_item_format is a pattern used to append a field if there is no good match.
*
* @see i18n_udatepg_get_append_item_format()
*/
-int i18n_udatepg_set_append_item_format ( i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, const i18n_uchar *value, int32_t length );
+int i18n_udatepg_set_append_item_format(i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, const i18n_uchar *value, int32_t length);
/**
* @brief Getter corresponding to i18n_udatepg_set_append_item_format().
*
* @see i18n_udatepg_set_append_item_format()
*/
-const i18n_uchar *i18n_udatepg_get_append_item_format ( const i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, int32_t *pattern_length );
+const i18n_uchar *i18n_udatepg_get_append_item_format(const i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, int32_t *pattern_length);
/**
* @brief Sets the name of field, e.g. "era" in English for ERA.
*
* @see i18n_udatepg_get_append_item_name()
*/
-int i18n_udatepg_set_append_item_name ( i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, const i18n_uchar *value,
- int32_t length );
+int i18n_udatepg_set_append_item_name(i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field, const i18n_uchar *value,
+ int32_t length);
/**
* @brief Getter corresponding to i18n_udatepg_set_append_item_name().
*
* @see i18n_udatepg_set_append_item_name()
*/
-const i18n_uchar *i18n_udatepg_get_append_item_name ( const i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field,
- int32_t *pattern_length );
+const i18n_uchar *i18n_udatepg_get_append_item_name(const i18n_udatepg_h dtpg, i18n_udatepg_date_time_pattern_field_e field,
+ int32_t *pattern_length);
/**
* @brief The date time format is a message format pattern used to compose date and time patterns.
*
* @see i18n_udatepg_get_date_time_format()
*/
-int i18n_udatepg_set_date_time_format ( const i18n_udatepg_h dtpg, const i18n_uchar *date_time_format, int32_t length );
+int i18n_udatepg_set_date_time_format(const i18n_udatepg_h dtpg, const i18n_uchar *date_time_format, int32_t length);
/**
* @brief Getter corresponding to i18n_udatepg_set_date_time_format().
*
* @see i18n_udatepg_set_date_time_format()
*/
-const i18n_uchar *i18n_udatepg_get_date_time_format ( const i18n_udatepg_h dtpg, int32_t *pattern_length );
+const i18n_uchar *i18n_udatepg_get_date_time_format(const i18n_udatepg_h dtpg, int32_t *pattern_length);
/**
* @brief The decimal value is used in formatting fractions of seconds.
*
* @see i18n_udatepg_get_decimal()
*/
-int i18n_udatepg_set_decimal ( i18n_udatepg_h dtpg, const i18n_uchar *decimal, int32_t length );
+int i18n_udatepg_set_decimal(i18n_udatepg_h dtpg, const i18n_uchar *decimal, int32_t length);
/**
* @brief Getter corresponding to i18n_udatepg_set_decimal().
*
* @see i18n_udatepg_set_decimal()
*/
-const i18n_uchar *i18n_udatepg_get_decimal ( const i18n_udatepg_h dtpg, int32_t *pattern_length );
+const i18n_uchar *i18n_udatepg_get_decimal(const i18n_udatepg_h dtpg, int32_t *pattern_length);
/**
* @brief Adjusts the field types (width and subtype) of a @a pattern to match what is in a @a skeleton.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_udatepg_replace_field_types ( i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length,
- const i18n_uchar *skeleton, int32_t skeleton_length, i18n_uchar *dest, int32_t dest_capacity );
+int32_t i18n_udatepg_replace_field_types(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length,
+ const i18n_uchar *skeleton, int32_t skeleton_length, i18n_uchar *dest, int32_t dest_capacity);
/**
* @brief Adjusts the field types (width and subtype) of a pattern to match what is in a @a skeleton.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_udatepg_replace_field_types_with_options ( i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length,
+int32_t i18n_udatepg_replace_field_types_with_options(i18n_udatepg_h dtpg, const i18n_uchar *pattern, int32_t pattern_length,
const i18n_uchar *skeleton, int32_t skeleton_length, i18n_udatepg_date_time_pattern_match_options_e options,
- i18n_uchar *dest, int32_t dest_capacity );
+ i18n_uchar *dest, int32_t dest_capacity);
/**
* @brief Creates an #i18n_uenumeration_h for list of all the skeletons in canonical form.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udatepg_skeletons_create ( const i18n_udatepg_h dtpg, i18n_uenumeration_h *enumeration );
+int i18n_udatepg_skeletons_create(const i18n_udatepg_h dtpg, i18n_uenumeration_h *enumeration);
/**
* @brief Creates an #i18n_uenumeration_h for list of all the base skeletons in canonical form.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_udatepg_base_skeletons_create ( const i18n_udatepg_h dtpg, i18n_uenumeration_h *enumeration );
+int i18n_udatepg_base_skeletons_create(const i18n_udatepg_h dtpg, i18n_uenumeration_h *enumeration);
/**
* @brief Gets the pattern corresponding to a given skeleton.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-const i18n_uchar *i18n_udatepg_get_pattern_for_skeleton ( const i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t skeleton_length, int32_t *pattern_length );
+const i18n_uchar *i18n_udatepg_get_pattern_for_skeleton(const i18n_udatepg_h dtpg, const i18n_uchar *skeleton, int32_t skeleton_length, int32_t *pattern_length);
#ifdef __cplusplus
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uenumeration_destroy ( i18n_uenumeration_h enumeration );
+int i18n_uenumeration_destroy(i18n_uenumeration_h enumeration);
/**
* @brief Returns the number of elements that the iterator traverses.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @exception #I18N_ERROR_ENUM_OUT_OF_SYNC The iterator is out of sync
*/
-int32_t i18n_uenumeration_count ( i18n_uenumeration_h enumeration );
+int32_t i18n_uenumeration_count(i18n_uenumeration_h enumeration);
/**
* @brief Returns the next element in the iterator's list.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @exception #I18N_ERROR_ENUM_OUT_OF_SYNC The iterator is out of sync
*/
-const i18n_uchar *i18n_uenumeration_unext ( i18n_uenumeration_h enumeration, int32_t *result_length );
+const i18n_uchar *i18n_uenumeration_unext(i18n_uenumeration_h enumeration, int32_t *result_length);
/**
* @brief Returns the next element in the iterator's list.
* @exception #I18N_ERROR_INVARIANT_CONVERSION The underlying native string is <code>i18n_uchar*</code> and conversion to <code>char*</code> with the invariant converter fails.
* This error pertains only to current string, so iteration might be able to continue successfully.
*/
-const char *i18n_uenumeration_next ( i18n_uenumeration_h enumeration, int32_t *result_length );
+const char *i18n_uenumeration_next(i18n_uenumeration_h enumeration, int32_t *result_length);
/**
* @brief Resets the iterator to the current list of service IDs.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uenumeration_reset ( i18n_uenumeration_h enumeration );
+int i18n_uenumeration_reset(i18n_uenumeration_h enumeration);
/**
* @brief Given an array of <code>const i18n_uchar*</code> strings, return an #i18n_uenumeration_h.
*
* @see i18n_uenumeration_destroy()
*/
-int i18n_uenumeration_uchar_strings_enumeration_create(const i18n_uchar *const strings[], int32_t count, i18n_uenumeration_h *enumeration );
+int i18n_uenumeration_uchar_strings_enumeration_create(const i18n_uchar *const strings[], int32_t count, i18n_uenumeration_h *enumeration);
/**
* @brief Given an array of <code>const char*</code> strings (invariant chars only), return an #i18n_uenumeration_h.
*
* @see i18n_uenumeration_destroy()
*/
-int i18n_uenumeration_char_strings_enumeration_create(const char* const strings[], int32_t count, i18n_uenumeration_h *enumeration );
+int i18n_uenumeration_char_strings_enumeration_create(const char* const strings[], int32_t count, i18n_uenumeration_h *enumeration);
/**
* @}
// Gets default locale
ret = i18n_ulocale_get_default(&locale);
- if ( ret != I18N_ERROR_NONE ) {
+ if (ret != I18N_ERROR_NONE) {
dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_default() failed!!! \n");
}
dlog_print(DLOG_INFO, LOG_TAG, "default locale : %s\n", locale); // default locale : en_GB.UTF-8
// Gets the language code for the specified locale
ret = i18n_ulocale_get_language(locale, language, language_capacity, &buf_size_language);
- if ( ret != I18N_ERROR_NONE ) {
+ if (ret != I18N_ERROR_NONE) {
dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_language() failed!!! \n");
}
dlog_print(DLOG_INFO, LOG_TAG, "language code for the locale : %s\n", language); // language code for the locale : en
// Gets the full name suitable for display for the specified locale
ret = i18n_ulocale_get_display_name(locale, in_locale_id, result_w, 64, &buf_size_display_name);
- if ( ret != I18N_ERROR_NONE ) {
+ if (ret != I18N_ERROR_NONE) {
dlog_print(DLOG_ERROR, LOG_TAG, "i18n_ulocale_get_display_name() failed!!! \n");
}
i18n_ustring_copy_au(result, result_w);
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ulocale_get_default ( const char **locale );
+int i18n_ulocale_get_default(const char **locale);
/**
* @brief Sets I18N's default locale.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ulocale_set_default ( const char *locale_id );
+int i18n_ulocale_set_default(const char *locale_id);
/**
* @brief Gets the language code for the specified locale.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ulocale_get_language ( const char *locale_id, char *language, int32_t language_capacity, int32_t *buf_size_language );
+int i18n_ulocale_get_language(const char *locale_id, char *language, int32_t language_capacity, int32_t *buf_size_language);
/**
* @brief Gets the country code for the specified locale.
* @return The actual buffer size needed for the country code.\n
* If it's greater than @a country_capacity, the returned country code will be truncated.
*/
-int32_t i18n_ulocale_get_country ( const char *locale_id, char *country, int32_t country_capacity, int *error );
+int32_t i18n_ulocale_get_country(const char *locale_id, char *country, int32_t country_capacity, int *error);
/**
* @brief Gets the full name suitable for display for the specified locale.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ulocale_get_display_name ( const char *locale_id, const char *in_locale_id, i18n_uchar *result, int32_t max_result_size, int32_t *buf_size_display_name );
+int i18n_ulocale_get_display_name(const char *locale_id, const char *in_locale_id, i18n_uchar *result, int32_t max_result_size, int32_t *buf_size_display_name);
/**
* @brief Gets the specified locale from a list of all available locales.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-const char* i18n_ulocale_get_available ( int32_t n );
+const char* i18n_ulocale_get_available(int32_t n);
/**
* @brief Gets the size of the all available locale list.
* @return The size of the locale list
* @exception #I18N_ERROR_NONE Success
*/
-int32_t i18n_ulocale_count_available ( void );
+int32_t i18n_ulocale_count_available(void);
// Newly Added APIs
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_get_script ( const char *locale_id, char *script, int32_t script_capacity );
+int32_t i18n_ulocale_get_script(const char *locale_id, char *script, int32_t script_capacity);
/**
* @brief Gets the variant code for the specified locale.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_get_variant ( const char *locale_id, char *variant, int32_t variant_capacity );
+int32_t i18n_ulocale_get_variant(const char *locale_id, char *variant, int32_t variant_capacity);
/**
* @brief Gets the full name for the specified locale.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer
*/
-int32_t i18n_ulocale_get_name ( const char *locale_id, char *name, int32_t name_capacity );
+int32_t i18n_ulocale_get_name(const char *locale_id, char *name, int32_t name_capacity);
/**
* @brief Gets the full name for the specified locale.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer
*/
-int32_t i18n_ulocale_canonicalize ( const char *locale_id, char *name, int32_t name_capacity );
+int32_t i18n_ulocale_canonicalize(const char *locale_id, char *name, int32_t name_capacity);
/**
* @brief Gets the ISO language code for the specified locale.
*
* @exception #I18N_ERROR_NONE Successful
*/
-const char * i18n_ulocale_get_iso3_language ( const char *locale_id );
+const char * i18n_ulocale_get_iso3_language(const char *locale_id);
/**
* @brief Gets the ISO country code for the specified locale.
*
* @exception #I18N_ERROR_NONE Successful
*/
-const char * i18n_ulocale_get_iso3_country ( const char *locale_id );
+const char * i18n_ulocale_get_iso3_country(const char *locale_id);
/**
* @brief Gets the Win32 LCID value for the specified locale.
*
* @exception #I18N_ERROR_NONE Successful
*/
-uint32_t i18n_ulocale_get_lcid ( const char *locale_id );
+uint32_t i18n_ulocale_get_lcid(const char *locale_id);
/**
* @brief Gets the language name suitable for display for the specified locale.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_get_display_language ( const char *locale, const char *display_locale, i18n_uchar *language, int32_t language_capacity );
+int32_t i18n_ulocale_get_display_language(const char *locale, const char *display_locale, i18n_uchar *language, int32_t language_capacity);
/**
* @brief Gets the script name suitable for display for the specified locale.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_get_display_script ( const char *locale, const char *display_locale, i18n_uchar *script, int32_t script_capacity );
+int32_t i18n_ulocale_get_display_script(const char *locale, const char *display_locale, i18n_uchar *script, int32_t script_capacity);
/**
* @brief Gets the country name suitable for display for the specified locale.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_get_display_country ( const char *locale, const char *display_locale, i18n_uchar *country, int32_t country_capacity );
+int32_t i18n_ulocale_get_display_country(const char *locale, const char *display_locale, i18n_uchar *country, int32_t country_capacity);
/**
* @brief Gets the variant name suitable for display for the specified locale.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_get_display_variant ( const char *locale, const char *display_locale, i18n_uchar *variant, int32_t variant_capacity );
+int32_t i18n_ulocale_get_display_variant(const char *locale, const char *display_locale, i18n_uchar *variant, int32_t variant_capacity);
/**
* @brief Gets the keyword name suitable for display for the specified locale.
* @see i18n_uenumeration_next()
* @see i18n_uenumeration_destroy()
*/
-int32_t i18n_ulocale_get_display_keyword ( const char *keyword, const char *display_locale, i18n_uchar *dest, int32_t dest_capacity );
+int32_t i18n_ulocale_get_display_keyword(const char *keyword, const char *display_locale, i18n_uchar *dest, int32_t dest_capacity);
/**
* @brief Gets the value of the keyword suitable for display for the specified locale.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_get_display_keyword_value ( const char *locale, const char *keyword, const char *display_locale, i18n_uchar *dest, int32_t dest_capacity );
+int32_t i18n_ulocale_get_display_keyword_value(const char *locale, const char *keyword, const char *display_locale, i18n_uchar *dest, int32_t dest_capacity);
/**
* @brief Gets a list of all available 2-letter language codes defined in ISO 639,
*
* @exception #I18N_ERROR_NONE Successful
*/
-const char * const *i18n_ulocale_get_iso_languages ( void );
+const char * const *i18n_ulocale_get_iso_languages(void);
/**
*
*
* @exception #I18N_ERROR_NONE Successful
*/
-const char * const *i18n_ulocale_get_iso_countries ( void );
+const char * const *i18n_ulocale_get_iso_countries(void);
/**
* @brief Truncates the locale ID string to get the parent locale ID.
* in the @a locale_id from index 0 to the index of the last occurrence of
* the underscore ("_") symbol.
*/
-int32_t i18n_ulocale_get_parent ( const char *locale_id, char *parent, int32_t parent_capacity );
+int32_t i18n_ulocale_get_parent(const char *locale_id, char *parent, int32_t parent_capacity);
/**
* @brief Gets the full name for the specified locale, like i18n_ulocale_get_name(), but without keywords.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer
*/
-int32_t i18n_ulocale_get_base_name ( const char *locale_id, char *name, int32_t name_capacity );
+int32_t i18n_ulocale_get_base_name(const char *locale_id, char *name, int32_t name_capacity);
/**
* @brief Gets an enumeration of keywords for the specified locale.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ulocale_keywords_create ( const char *locale_id, i18n_uenumeration_h *enumeration );
+int i18n_ulocale_keywords_create(const char *locale_id, i18n_uenumeration_h *enumeration);
/**
* @brief Gets the value for a keyword.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_get_keyword_value ( const char *locale_id, const char *keyword_name, char *buffer, int32_t buffer_capacity );
+int32_t i18n_ulocale_get_keyword_value(const char *locale_id, const char *keyword_name, char *buffer, int32_t buffer_capacity);
/**
* @brief Sets or removes the value of the specified keyword.
*
* @see i18n_ulocale_get_keyword_value()
*/
-int32_t i18n_ulocale_set_keyword_value ( const char *keyword_name, const char *keyword_value, char *buffer, int32_t buffer_capacity );
+int32_t i18n_ulocale_set_keyword_value(const char *keyword_name, const char *keyword_value, char *buffer, int32_t buffer_capacity);
/**
* @brief Gets the layout character orientation for the specified locale.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ulocale_get_character_orientation ( const char *locale_id, i18n_ulocale_layout_type_e *layout_type );
+int i18n_ulocale_get_character_orientation(const char *locale_id, i18n_ulocale_layout_type_e *layout_type);
/**
* @brief Gets the layout line orientation for the specified locale.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_ulocale_get_line_orientation ( const char *locale_id, i18n_ulocale_layout_type_e *layout_type );
+int i18n_ulocale_get_line_orientation(const char *locale_id, i18n_ulocale_layout_type_e *layout_type);
/**
* @brief Gets the I18N locale ID for the specified Win32 LCID value.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_get_locale_for_lcid ( uint32_t host_id, char *locale, int32_t locale_capacity );
+int32_t i18n_ulocale_get_locale_for_lcid(uint32_t host_id, char *locale, int32_t locale_capacity);
/**
* @brief Adds the likely subtags for a provided locale ID, per the algorithm described
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_add_likely_subtags ( const char *locale_id, char *maximized_locale_id, int32_t maximized_locale_id_capacity );
+int32_t i18n_ulocale_add_likely_subtags(const char *locale_id, char *maximized_locale_id, int32_t maximized_locale_id_capacity);
/**
* @brief Minimizes the subtags for a provided locale ID, per the algorithm described
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_minimize_subtags ( const char *locale_id, char *minimized_locale_id, int32_t minimized_locale_id_capacity );
+int32_t i18n_ulocale_minimize_subtags(const char *locale_id, char *minimized_locale_id, int32_t minimized_locale_id_capacity);
/**
* @brief Returns a locale ID for the specified BCP47 language tag string.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_for_language_tag ( const char *langtag, char *locale_id, int32_t locale_id_capacity, int32_t *parsed_length );
+int32_t i18n_ulocale_for_language_tag(const char *langtag, char *locale_id, int32_t locale_id_capacity, int32_t *parsed_length);
/**
* @brief Returns a well-formed language tag for this locale ID.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ulocale_to_language_tag ( const char *locale_id, char *langtag, int32_t langtag_capacity, i18n_ubool strict );
+int32_t i18n_ulocale_to_language_tag(const char *locale_id, char *langtag, int32_t langtag_capacity, i18n_ubool strict);
#ifdef __cplusplus
}
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_unormalization_get_instance (const char *package_name, const char *name, i18n_unormalization_mode_e mode,
+int i18n_unormalization_get_instance(const char *package_name, const char *name, i18n_unormalization_mode_e mode,
i18n_unormalizer_h *normalizer);
/**
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_unormalization_normalize (i18n_unormalizer_h normalizer, const i18n_uchar *src, int32_t len, i18n_uchar *dest, int32_t capacity, int32_t *len_deststr);
+int i18n_unormalization_normalize(i18n_unormalizer_h normalizer, const i18n_uchar *src, int32_t len, i18n_uchar *dest, int32_t capacity, int32_t *len_deststr);
#ifdef __cplusplus
}
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_unumber_create ( i18n_unumber_format_style_e style, const i18n_uchar *pattern, int32_t pattern_len, const char *locale,
- i18n_uparse_error_s *parse_err, i18n_unumber_format_h *num_format );
+int i18n_unumber_create(i18n_unumber_format_style_e style, const i18n_uchar *pattern, int32_t pattern_len, const char *locale,
+ i18n_uparse_error_s *parse_err, i18n_unumber_format_h *num_format);
/**
* @brief Destroys an #i18n_unumber_format_h.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_unumber_destroy ( i18n_unumber_format_h fmt );
+int i18n_unumber_destroy(i18n_unumber_format_h fmt);
/**
* @brief Gets a symbol associated with an #i18n_unumber_format_h.
* @retval #I18N_ERROR_NONE Successful.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_unumber_get_symbol ( const i18n_unumber_format_h fmt, i18n_unumber_format_symbol_e symbol, i18n_uchar *buffer, int32_t size, int32_t *len_symbol );
+int i18n_unumber_get_symbol(const i18n_unumber_format_h fmt, i18n_unumber_format_symbol_e symbol, i18n_uchar *buffer, int32_t size, int32_t *len_symbol);
// Newly Added APIs
* @retval #I18N_ERROR_NONE Successful.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_unumber_clone (const i18n_unumber_format_h fmt, i18n_unumber_format_h *fmt_clone);
+int i18n_unumber_clone(const i18n_unumber_format_h fmt, i18n_unumber_format_h *fmt_clone);
/**
* @brief Formats an integer using a i18n_unumber_format_h.
*
* @return The total buffer size needed; if greater than result_length, the output was truncated.
*/
-int32_t i18n_unumber_format (const i18n_unumber_format_h fmt, int32_t number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_s *pos, i18n_error_code_e *status);
+int32_t i18n_unumber_format(const i18n_unumber_format_h fmt, int32_t number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_s *pos, i18n_error_code_e *status);
/**
* @brief Formats an int64 using an #i18n_unumber_format_h.
* @exception #I18N_WARNING_STRING_NOT_TERMINATED If the formatted number fits into @a result but cannot be NULL-terminated (<code>length == result_length</code>)
* @exception #I18N_ERROR_BUFFER_OVERFLOW If the formatted number doesn't fit into the @a result buffer
*/
-int32_t i18n_unumber_format_int64 (const i18n_unumber_format_h fmt, int64_t number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos);
+int32_t i18n_unumber_format_int64(const i18n_unumber_format_h fmt, int64_t number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos);
/**
* @brief Formats a double using an #i18n_unumber_format_h.
* @exception #I18N_WARNING_STRING_NOT_TERMINATED If the formatted number fits into @a result but cannot be NULL-terminated (<code>length == result_length</code>)
* @exception #I18N_ERROR_BUFFER_OVERFLOW If the formatted number doesn't fit into the @a result buffer
*/
-int32_t i18n_unumber_format_double (const i18n_unumber_format_h fmt, double number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos);
+int32_t i18n_unumber_format_double(const i18n_unumber_format_h fmt, double number, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos);
/**
* @brief Formats a decimal number using an #i18n_unumber_format_h.
* @exception #I18N_WARNING_STRING_NOT_TERMINATED If the formatted number fits into @a result but cannot be NULL-terminated (<code>length == result_length</code>)
* @exception #I18N_ERROR_BUFFER_OVERFLOW If the formatted number doesn't fit into the @a result buffer
*/
-int32_t i18n_unumber_format_decimal (const i18n_unumber_format_h fmt, const char *number, int32_t length, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos);
+int32_t i18n_unumber_format_decimal(const i18n_unumber_format_h fmt, const char *number, int32_t length, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos);
/**
* @brief Formats a double currency amount using an #i18n_unumber_format_h.
* @exception #I18N_WARNING_STRING_NOT_TERMINATED If the formatted number fits into @a result but cannot be NULL-terminated (<code>length == result_length</code>)
* @exception #I18N_ERROR_BUFFER_OVERFLOW If the formatted number doesn't fit into the @a result buffer
*/
-int32_t i18n_unumber_format_double_currency (const i18n_unumber_format_h fmt, double number, i18n_uchar *currency, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos);
+int32_t i18n_unumber_format_double_currency(const i18n_unumber_format_h fmt, double number, i18n_uchar *currency, i18n_uchar *result, int32_t result_length, i18n_ufield_position_h pos);
/**
* @brief Parses a string into an integer using an #i18n_unumber_format_h.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_unumber_parse (const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos);
+int32_t i18n_unumber_parse(const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos);
/**
* @brief Parses a string into an int64 using an #i18n_unumber_format_h.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int64_t i18n_unumber_parse_int64 (const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos);
+int64_t i18n_unumber_parse_int64(const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos);
/**
* @brief Parses a string into a double using an #i18n_unumber_format_h.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-double i18n_unumber_parse_double (const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos);
+double i18n_unumber_parse_double(const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos);
/**
* @brief Parses a number from a string into an unformatted numeric string using an #i18n_unumber_format_h.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_unumber_parse_decimal (const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, char *out_buf, int32_t out_buf_length);
+int32_t i18n_unumber_parse_decimal(const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, char *out_buf, int32_t out_buf_length);
/**
* @brief Parses a string into a double and a currency using an #i18n_unumber_format_h.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-double i18n_unumber_parse_double_currency (const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, i18n_uchar *currency);
+double i18n_unumber_parse_double_currency(const i18n_unumber_format_h fmt, const i18n_uchar *text, int32_t text_length, int32_t *parse_pos, i18n_uchar *currency);
/**
* @brief Sets the pattern used by an #i18n_unumber_format_h.
* @retval #I18N_ERROR_NONE Successful.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_unumber_apply_pattern (i18n_unumber_format_h format, i18n_ubool localized, const i18n_uchar *pattern, int32_t pattern_length, i18n_uparse_error_s* parse_error);
+int i18n_unumber_apply_pattern(i18n_unumber_format_h format, i18n_ubool localized, const i18n_uchar *pattern, int32_t pattern_length, i18n_uparse_error_s* parse_error);
/**
* @brief Gets a locale for which decimal formatting patterns are available.
*
* @exception #I18N_ERROR_NONE Successful
*/
-const char *i18n_unumber_get_available (int32_t locale_index);
+const char *i18n_unumber_get_available(int32_t locale_index);
/**
* @brief Determines how many locales have decimal formatting patterns available.
*
* @exception #I18N_ERROR_NONE Successful
*/
-int32_t i18n_unumber_count_available (void);
+int32_t i18n_unumber_count_available(void);
/**
* @brief Gets a numeric attribute associated with an #i18n_unumber_format_h.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_unumber_get_attribute (const i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr);
+int32_t i18n_unumber_get_attribute(const i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr);
/**
* @brief Sets a numeric attribute associated with an #i18n_unumber_format_h.
* @retval #I18N_ERROR_NONE Successful.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_unumber_set_attribute (i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr, int32_t new_value);
+int i18n_unumber_set_attribute(i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr, int32_t new_value);
/**
* @brief Gets a numeric attribute associated with an #i18n_unumber_format_h.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-double i18n_unumber_get_double_attribute (const i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr);
+double i18n_unumber_get_double_attribute(const i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr);
/**
* @brief Sets a numeric attribute associated with an #i18n_unumber_format_h.
* @retval #I18N_ERROR_NONE Successful.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_unumber_set_double_attribute (i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr, double new_value);
+int i18n_unumber_set_double_attribute(i18n_unumber_format_h fmt, i18n_unumber_format_attribute_e attr, double new_value);
/**
* @brief Gets a text attribute associated with an #i18n_unumber_format_h.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_unumber_get_text_attribute (const i18n_unumber_format_h fmt, i18n_unumber_format_text_attribute_e tag, i18n_uchar *result, int32_t result_length);
+int32_t i18n_unumber_get_text_attribute(const i18n_unumber_format_h fmt, i18n_unumber_format_text_attribute_e tag, i18n_uchar *result, int32_t result_length);
/**
* @brief Sets a text attribute associated with an #i18n_unumber_format_h.
* @retval #I18N_ERROR_NONE Successful.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_unumber_set_text_attribute (const i18n_unumber_format_h fmt, i18n_unumber_format_text_attribute_e tag, const i18n_uchar *new_value, int32_t new_value_length);
+int i18n_unumber_set_text_attribute(const i18n_unumber_format_h fmt, i18n_unumber_format_text_attribute_e tag, const i18n_uchar *new_value, int32_t new_value_length);
/**
* @brief Extracts the pattern from an #i18n_unumber_format_h.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_unumber_to_pattern (const i18n_unumber_format_h fmt, i18n_ubool is_pattern_localized, i18n_uchar *result, int32_t result_length);
+int32_t i18n_unumber_to_pattern(const i18n_unumber_format_h fmt, i18n_ubool is_pattern_localized, i18n_uchar *result, int32_t result_length);
/**
* @brief Sets a symbol associated with an #i18n_unumber_format_h.
* @retval #I18N_ERROR_NONE Successful.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_unumber_set_symbol (i18n_unumber_format_h fmt, i18n_unumber_format_symbol_e symbol, const i18n_uchar *value, int32_t length);
+int i18n_unumber_set_symbol(i18n_unumber_format_h fmt, i18n_unumber_format_symbol_e symbol, const i18n_uchar *value, int32_t length);
/**
* @brief Gets the locale for this number format object.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-const char *i18n_unumber_get_locale_by_type (const i18n_unumber_format_h fmt, i18n_ulocale_data_locale_type_e type);
+const char *i18n_unumber_get_locale_by_type(const i18n_unumber_format_h fmt, i18n_ulocale_data_locale_type_e type);
#ifdef __cplusplus
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_usearch_create_new ( const i18n_uchar *pattern, int32_t pattern_len, const i18n_uchar *text,
+int i18n_usearch_create_new(const i18n_uchar *pattern, int32_t pattern_len, const i18n_uchar *text,
int32_t text_len, const char *locale, i18n_ubreak_iterator_h break_iter, i18n_usearch_h *search_iter);
/**
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_usearch_destroy ( i18n_usearch_h search_iter );
+int i18n_usearch_destroy(i18n_usearch_h search_iter);
/**
* @brief Returns the text that matches by the most recent call to i18n_usearch_first(), or so on.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @retval #I18N_ERROR_BUFFER_OVERFLOW A result would not fit in the supplied buffer
*/
-int i18n_usearch_get_matched_text ( const i18n_usearch_h search_iter, i18n_uchar *result, int32_t result_capacity, int32_t *len_matched_text );
+int i18n_usearch_get_matched_text(const i18n_usearch_h search_iter, i18n_uchar *result, int32_t result_capacity, int32_t *len_matched_text);
/**
* @brief Gets the collator used for the language rules.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_usearch_get_collator ( const i18n_usearch_h search_iter, i18n_ucollator_h *collator );
+int i18n_usearch_get_collator(const i18n_usearch_h search_iter, i18n_ucollator_h *collator);
/**
* @brief Returns the first index at which the string text matches the search pattern.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_usearch_first ( i18n_usearch_h search_iter, int32_t *index_first );
+int i18n_usearch_first(i18n_usearch_h search_iter, int32_t *index_first);
#ifdef __cplusplus
}
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_uset_destroy()
*/
-int i18n_uset_create_empty (i18n_uset_h *set);
+int i18n_uset_create_empty(i18n_uset_h *set);
/**
* @brief Creates an #i18n_uset_h object that contains the range of characters
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_uset_destroy()
*/
-int i18n_uset_create (i18n_uchar32 start, i18n_uchar32 end, i18n_uset_h *set);
+int i18n_uset_create(i18n_uchar32 start, i18n_uchar32 end, i18n_uset_h *set);
/**
* @brief Creates a set based on a given pattern.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_uset_destroy()
*/
-int i18n_uset_create_pattern (const i18n_uchar *pattern, int32_t pattern_length, i18n_uset_h *set);
+int i18n_uset_create_pattern(const i18n_uchar *pattern, int32_t pattern_length, i18n_uset_h *set);
/**
* @brief Creates a set based on a given pattern.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_uset_destroy()
*/
-int i18n_uset_create_pattern_options (const i18n_uchar *pattern, int32_t pattern_length, uint32_t options, i18n_uset_h *set);
+int i18n_uset_create_pattern_options(const i18n_uchar *pattern, int32_t pattern_length, uint32_t options, i18n_uset_h *set);
/**
* @brief Disposes of the storage used by a #i18n_uset_h object.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_destroy (i18n_uset_h set);
+int i18n_uset_destroy(i18n_uset_h set);
/**
* @brief Returns a copy of this object.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_uset_clone_as_thawed()
*/
-int i18n_uset_clone (const i18n_uset_h set, i18n_uset_h *set_clone);
+int i18n_uset_clone(const i18n_uset_h set, i18n_uset_h *set_clone);
/**
* @brief Determines whether the set has been frozen (made immutable) or not.
* @see i18n_uset_freeze()
* @see i18n_uset_clone_as_thawed()
*/
-i18n_ubool i18n_uset_is_frozen (const i18n_uset_h set);
+i18n_ubool i18n_uset_is_frozen(const i18n_uset_h set);
/**
* @brief Freezes the set (make it immutable).
* @see i18n_uset_is_frozen()
* @see i18n_uset_clone_as_thawed()
*/
-int i18n_uset_freeze (i18n_uset_h set);
+int i18n_uset_freeze(i18n_uset_h set);
/**
* @brief Clones the set and make the clone mutable.
* @see i18n_uset_is_frozen()
* @see i18n_uset_clone()
*/
-int i18n_uset_clone_as_thawed (const i18n_uset_h set, i18n_uset_h *set_copy);
+int i18n_uset_clone_as_thawed(const i18n_uset_h set, i18n_uset_h *set_copy);
/**
* @brief Causes the #i18n_uset_h object to represent the range <code>start - end</code>.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_set (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end);
+int i18n_uset_set(i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end);
/**
* @brief Modifies the set to represent the set specified by the given
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_uset_apply_pattern (i18n_uset_h set, const i18n_uchar *pattern, int32_t pattern_length, uint32_t options);
+int32_t i18n_uset_apply_pattern(i18n_uset_h set, const i18n_uchar *pattern, int32_t pattern_length, uint32_t options);
/**
* @brief Modifies the set to contain those code points which have the given value
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_apply_int_property_value (i18n_uset_h set, i18n_uchar_uproperty_e prop, int32_t value);
+int i18n_uset_apply_int_property_value(i18n_uset_h set, i18n_uchar_uproperty_e prop, int32_t value);
/**
* @brief Modifies the set to contain those code points which have the
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_apply_property_alias (i18n_uset_h set, const i18n_uchar *prop, int32_t prop_length, const i18n_uchar *value, int32_t value_length);
+int i18n_uset_apply_property_alias(i18n_uset_h set, const i18n_uchar *prop, int32_t prop_length, const i18n_uchar *value, int32_t value_length);
/**
* @brief Return true if the given position, in the given pattern, appears
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_uset_resembles_pattern (const i18n_uchar *pattern, int32_t pattern_length, int32_t pos);
+i18n_ubool i18n_uset_resembles_pattern(const i18n_uchar *pattern, int32_t pattern_length, int32_t pos);
/**
* @brief Returns a string representation of the given @a set.
*
* @see i18n_uset_pattern_create()
*/
-int32_t i18n_uset_to_pattern (const i18n_uset_h set, i18n_uchar *result, int32_t result_capacity, i18n_ubool escape_unprintable);
+int32_t i18n_uset_to_pattern(const i18n_uset_h set, i18n_uchar *result, int32_t result_capacity, i18n_ubool escape_unprintable);
/**
* @brief Adds the given character to the given #i18n_uset_h.
*
* @see i18n_uset_contains()
*/
-int i18n_uset_add (i18n_uset_h set, i18n_uchar32 character);
+int i18n_uset_add(i18n_uset_h set, i18n_uchar32 character);
/**
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_add_all (i18n_uset_h set, const i18n_uset_h additional_set);
+int i18n_uset_add_all(i18n_uset_h set, const i18n_uset_h additional_set);
/**
* @brief Adds the given range of characters to the given #i18n_uset_h. After this call,
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_uset_contains()
*/
-int i18n_uset_add_range (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end);
+int i18n_uset_add_range(i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end);
/**
* @brief Adds the given string to the given #i18n_uset_h.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_uset_contains_string()
*/
-int i18n_uset_add_string (i18n_uset_h set, const i18n_uchar *str, int32_t str_len);
+int i18n_uset_add_string(i18n_uset_h set, const i18n_uchar *str, int32_t str_len);
/**
* @brief Adds each of the characters in this string to the set. Thus "ch" => {"c", "h"}
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_add_all_code_points (i18n_uset_h set, const i18n_uchar *str, int32_t str_len);
+int i18n_uset_add_all_code_points(i18n_uset_h set, const i18n_uchar *str, int32_t str_len);
/**
* @brief Removes the given @a character from the given #i18n_uset_h.
*
* @see i18n_uset_contains()
*/
-int i18n_uset_remove (i18n_uset_h set, i18n_uchar32 character);
+int i18n_uset_remove(i18n_uset_h set, i18n_uchar32 character);
/**
* @brief Removes the given range of characters from the given #i18n_uset_h.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_uset_contains()
*/
-int i18n_uset_remove_range (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end);
+int i18n_uset_remove_range(i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end);
/**
* @brief Removes the given string to the given #i18n_uset_h.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_uset_contains_string()
*/
-int i18n_uset_remove_string (i18n_uset_h set, const i18n_uchar *str, int32_t str_len);
+int i18n_uset_remove_string(i18n_uset_h set, const i18n_uchar *str, int32_t str_len);
/**
* @brief Removes from this set all of its elements that are contained in the specified set.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_remove_all (i18n_uset_h set, const i18n_uset_h remove_set);
+int i18n_uset_remove_all(i18n_uset_h set, const i18n_uset_h remove_set);
/**
* @brief Retains only the elements in this set that are contained in the specified range.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_retain (i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end);
+int i18n_uset_retain(i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end);
/**
* @brief Retains only the elements in this set that are contained in the
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_retain_all (i18n_uset_h set, const i18n_uset_h retain);
+int i18n_uset_retain_all(i18n_uset_h set, const i18n_uset_h retain);
/**
* @brief Reallocates this objects internal structures to take up the least
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_compact (i18n_uset_h set);
+int i18n_uset_compact(i18n_uset_h set);
/**
* @brief Inverts this set. This operation modifies this set so that
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_complement (i18n_uset_h set);
+int i18n_uset_complement(i18n_uset_h set);
/**
* @brief Complements in this set all elements contained in the specified set.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_complement_all (i18n_uset_h set, const i18n_uset_h complement);
+int i18n_uset_complement_all(i18n_uset_h set, const i18n_uset_h complement);
/**
* @brief Removes all of the elements from this set.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_clear (i18n_uset_h set);
+int i18n_uset_clear(i18n_uset_h set);
/**
* @brief Closes this set over the given attribute.
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ustring_fold_case()
*/
-int i18n_uset_destroy_over (i18n_uset_h set, int32_t attributes);
+int i18n_uset_destroy_over(i18n_uset_h set, int32_t attributes);
/**
* @brief Removes all strings from this set.
* @retval #I18N_ERROR_NONE Successful
* @retval #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int i18n_uset_remove_all_strings (i18n_uset_h set);
+int i18n_uset_remove_all_strings(i18n_uset_h set);
/**
* @brief Returns true if the given #i18n_uset_h contains no characters and no
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_uset_is_empty (const i18n_uset_h set);
+i18n_ubool i18n_uset_is_empty(const i18n_uset_h set);
/**
* @brief Returns @c true if the given #i18n_uset_h contains the given @a character.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_uset_contains (const i18n_uset_h set, i18n_uchar32 character);
+i18n_ubool i18n_uset_contains(const i18n_uset_h set, i18n_uchar32 character);
/**
* @brief Returns true if the given #i18n_uset_h contains all characters c
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_uset_contains_range (const i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end);
+i18n_ubool i18n_uset_contains_range(const i18n_uset_h set, i18n_uchar32 start, i18n_uchar32 end);
/**
* @brief Returns true if the given #i18n_uset_h contains the given string.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_uset_contains_string (const i18n_uset_h set, const i18n_uchar *str, int32_t str_len);
+i18n_ubool i18n_uset_contains_string(const i18n_uset_h set, const i18n_uchar *str, int32_t str_len);
/**
* @brief Returns the index of the given @a character within this @a set, where
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_uset_index_of (const i18n_uset_h set, i18n_uchar32 character);
+int32_t i18n_uset_index_of(const i18n_uset_h set, i18n_uchar32 character);
/**
* @brief Returns the character at the given index within this set, where
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar32 i18n_uset_char_at (const i18n_uset_h set, int32_t char_index);
+i18n_uchar32 i18n_uset_char_at(const i18n_uset_h set, int32_t char_index);
/**
* @brief Returns the number of characters and strings contained in the given #i18n_uset_h.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_uset_size (const i18n_uset_h set);
+int32_t i18n_uset_size(const i18n_uset_h set);
/**
* @brief Returns the number of items in this set.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_uset_get_item_count (const i18n_uset_h set);
+int32_t i18n_uset_get_item_count(const i18n_uset_h set);
/**
* @brief Returns an item of this set.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_uset_get_item (const i18n_uset_h set, int32_t item_index, i18n_uchar32 *start, i18n_uchar32 *end, i18n_uchar *str, int32_t str_capacity);
+int32_t i18n_uset_get_item(const i18n_uset_h set, int32_t item_index, i18n_uchar32 *start, i18n_uchar32 *end, i18n_uchar *str, int32_t str_capacity);
/**
* @brief Returns true if set1 contains all the characters and strings of set2. It answers the question, 'Is set1 a superset of set2?'
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_uset_contains_all (const i18n_uset_h set1, const i18n_uset_h set2);
+i18n_ubool i18n_uset_contains_all(const i18n_uset_h set1, const i18n_uset_h set2);
/**
* @brief Returns true if this set contains all the characters of the given string.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_uset_contains_all_code_points (const i18n_uset_h set, const i18n_uchar *str, int32_t str_len);
+i18n_ubool i18n_uset_contains_all_code_points(const i18n_uset_h set, const i18n_uchar *str, int32_t str_len);
/**
* @brief Returns true if set1 contains none of the characters and strings of set2.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_uset_contains_none (const i18n_uset_h set1, const i18n_uset_h set2);
+i18n_ubool i18n_uset_contains_none(const i18n_uset_h set1, const i18n_uset_h set2);
/**
* @brief Returns true if set1 contains some of the characters and strings of set2.
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_uset_contains_some (const i18n_uset_h set1, const i18n_uset_h set2);
+i18n_ubool i18n_uset_contains_some(const i18n_uset_h set1, const i18n_uset_h set2);
/**
* @brief Returns the length of the initial substring of the input string which
*
* @see #i18n_uset_span_condition_e
*/
-int32_t i18n_uset_span (const i18n_uset_h set, const i18n_uchar *str, int32_t length, i18n_uset_span_condition_e span_condition);
+int32_t i18n_uset_span(const i18n_uset_h set, const i18n_uchar *str, int32_t length, i18n_uset_span_condition_e span_condition);
/**
* @brief Returns the start of the trailing substring of the input string which
*
* @see #i18n_uset_span_condition_e
*/
-int32_t i18n_uset_span_back (const i18n_uset_h set, const i18n_uchar *str, int32_t length, i18n_uset_span_condition_e span_condition);
+int32_t i18n_uset_span_back(const i18n_uset_h set, const i18n_uchar *str, int32_t length, i18n_uset_span_condition_e span_condition);
/**
* @brief Returns the length of the initial substring of the input string which
*
* @see #i18n_uset_span_condition_e
*/
-int32_t i18n_uset_span_utf8 (const i18n_uset_h set, const char *str, int32_t length, i18n_uset_span_condition_e span_condition);
+int32_t i18n_uset_span_utf8(const i18n_uset_h set, const char *str, int32_t length, i18n_uset_span_condition_e span_condition);
/**
* @brief Returns the start of the trailing substring of the input string which
*
* @see #i18n_uset_span_condition_e
*/
-int32_t i18n_uset_span_back_utf8 (const i18n_uset_h set, const char *str, int32_t length, i18n_uset_span_condition_e span_condition);
+int32_t i18n_uset_span_back_utf8(const i18n_uset_h set, const char *str, int32_t length, i18n_uset_span_condition_e span_condition);
/**
* @brief Returns true if set1 contains all of the characters and strings
* @exception #I18N_ERROR_NONE Successful
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_uset_equals (const i18n_uset_h set1, const i18n_uset_h set2);
+i18n_ubool i18n_uset_equals(const i18n_uset_h set1, const i18n_uset_h set2);
/*********************************************************************
* Serialized set API
* @exception #I18N_ERROR_INDEX_OUTOFBOUNDS If <code>n+2*m > 0x7FFF</code>
* @exception #I18N_ERROR_BUFFER_OVERFLOW If <code>n+2*m+(m != 0 ? 2 : 1) > dest_capacity</code>.
*/
-int32_t i18n_uset_serialize (const i18n_uset_h set, uint16_t *dest, int32_t dest_capacity);
+int32_t i18n_uset_serialize(const i18n_uset_h set, uint16_t *dest, int32_t dest_capacity);
/**
* @brief Given a serialized array, fill in the given serialized set object.
*
* @see #i18n_userialized_set_s
*/
-i18n_ubool i18n_uset_get_serialized_set (const uint16_t *src, int32_t src_length, i18n_userialized_set_s* fill_set);
+i18n_ubool i18n_uset_get_serialized_set(const uint16_t *src, int32_t src_length, i18n_userialized_set_s* fill_set);
/**
* @brief Sets the #i18n_userialized_set_s to contain the given @a character (and nothing else).
*
* @see #i18n_userialized_set_s
*/
-int i18n_uset_set_serialized_to_one (i18n_uchar32 character, i18n_userialized_set_s* fill_set);
+int i18n_uset_set_serialized_to_one(i18n_uchar32 character, i18n_userialized_set_s* fill_set);
/**
* @brief Returns @c true if the given #i18n_userialized_set_s contains the given @a character.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see #i18n_userialized_set_s
*/
-i18n_ubool i18n_uset_serialized_contains (const i18n_userialized_set_s* set, i18n_uchar32 character);
+i18n_ubool i18n_uset_serialized_contains(const i18n_userialized_set_s* set, i18n_uchar32 character);
/**
* @brief Returns the number of disjoint ranges of characters contained in
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see #i18n_userialized_set_s
*/
-int32_t i18n_uset_get_serialized_range_count (const i18n_userialized_set_s* set);
+int32_t i18n_uset_get_serialized_range_count(const i18n_userialized_set_s* set);
/**
* @brief Returns a range of characters contained in the given serialized set.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see #i18n_userialized_set_s
*/
-i18n_ubool i18n_uset_get_serialized_range (const i18n_userialized_set_s* set, int32_t range_index, i18n_uchar32 *p_start, i18n_uchar32 *p_end);
+i18n_ubool i18n_uset_get_serialized_range(const i18n_userialized_set_s* set, int32_t range_index, i18n_uchar32 *p_start, i18n_uchar32 *p_end);
/**
* @}
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_get_length ( const i18n_uchar *s );
+int32_t i18n_ustring_get_length(const i18n_uchar *s);
/**
* @brief Counts Unicode code points in the length #i18n_uchar code units of the string.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_count_char32 ( const i18n_uchar *s, int32_t length );
+int32_t i18n_ustring_count_char32(const i18n_uchar *s, int32_t length);
/**
* @brief Checks if the string contains more Unicode code points than a certain number.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_ubool i18n_ustring_has_more_char32_than ( const i18n_uchar *s, int32_t length, int32_t number );
+i18n_ubool i18n_ustring_has_more_char32_than(const i18n_uchar *s, int32_t length, int32_t number);
/**
* @brief Concatenates two ustrings.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_cat ( i18n_uchar *dest, const i18n_uchar *src );
+i18n_uchar* i18n_ustring_cat(i18n_uchar *dest, const i18n_uchar *src);
/**
* @brief Concatenate two ustrings.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_cat_n ( i18n_uchar *dest, const i18n_uchar *src, int32_t n );
+i18n_uchar* i18n_ustring_cat_n(i18n_uchar *dest, const i18n_uchar *src, int32_t n);
/**
* @brief Finds the first occurrence of a substring in a string.
* @see i18n_ustring_find_first()
* @see i18n_ustring_find_last()
*/
-i18n_uchar* i18n_ustring_string ( const i18n_uchar *s, const i18n_uchar *sub_string );
+i18n_uchar* i18n_ustring_string(const i18n_uchar *s, const i18n_uchar *sub_string);
/**
* @brief Finds the first occurrence of a substring in a string.
* @see i18n_ustring_string()
* @see i18n_ustring_find_last()
*/
-i18n_uchar* i18n_ustring_find_first ( const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length );
+i18n_uchar* i18n_ustring_find_first(const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length);
/**
* @brief Finds the first occurrence of a BMP code point in a string.
* @see i18n_ustring_string()
* @see i18n_ustring_find_first()
*/
-i18n_uchar* i18n_ustring_char ( const i18n_uchar *s, i18n_uchar c );
+i18n_uchar* i18n_ustring_char(const i18n_uchar *s, i18n_uchar c);
/**
* @brief Finds the first occurrence of a code point in a string.
* @see i18n_ustring_string()
* @see i18n_ustring_find_first()
*/
-i18n_uchar* i18n_ustring_char32 ( const i18n_uchar *s, i18n_uchar32 c );
+i18n_uchar* i18n_ustring_char32(const i18n_uchar *s, i18n_uchar32 c);
/**
* @brief Finds the last occurrence of a substring in a string.
* @see i18n_ustring_find_first()
* @see i18n_ustring_find_last()
*/
-i18n_uchar* i18n_ustring_r_string ( const i18n_uchar *s, const i18n_uchar *sub_string );
+i18n_uchar* i18n_ustring_r_string(const i18n_uchar *s, const i18n_uchar *sub_string);
/**
* @brief Finds the last occurrence of a substring in a string.
* @see i18n_ustring_string()
* @see i18n_ustring_find_first()
*/
-i18n_uchar* i18n_ustring_find_last( const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length );
+i18n_uchar* i18n_ustring_find_last(const i18n_uchar *s, int32_t length, const i18n_uchar *sub_string, int32_t sub_length);
/**
* @brief Finds the last occurrence of a BMP code point in a string.
* @see i18n_ustring_string()
* @see i18n_ustring_find_first()
*/
-i18n_uchar* i18n_ustring_r_char ( const i18n_uchar *s, i18n_uchar c );
+i18n_uchar* i18n_ustring_r_char(const i18n_uchar *s, i18n_uchar c);
/**
* @brief Finds the last occurrence of a code point in a string.
* @see i18n_ustring_string()
* @see i18n_ustring_find_first()
*/
-i18n_uchar* i18n_ustring_r_char32 ( const i18n_uchar *s, i18n_uchar32 c );
+i18n_uchar* i18n_ustring_r_char32(const i18n_uchar *s, i18n_uchar32 c);
/**
* @brief Locates the first occurrence in the string of any of the characters in the string matchSet.
* @return A pointer to the character in @a string that matches one of the
* characters in @a match_set, or NULL if no such character is found.
*/
-i18n_uchar* i18n_ustring_pbrk ( const i18n_uchar *string, const i18n_uchar *match_set );
+i18n_uchar* i18n_ustring_pbrk(const i18n_uchar *string, const i18n_uchar *match_set);
/**
* @brief Returns the number of consecutive characters in string, beginning with the first, that do not occur somewhere in match_set.
* @return The number of initial characters in @a string that do not
* occur in @a match_set.
*/
-int32_t i18n_ustring_cspn ( const i18n_uchar *string, const i18n_uchar *match_set );
+int32_t i18n_ustring_cspn(const i18n_uchar *string, const i18n_uchar *match_set);
/**
* @brief Returns the number of consecutive characters in string, beginning with the first, that occur somewhere in match_set.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ustring_spn()
*/
-int32_t i18n_ustring_spn ( const i18n_uchar *string, const i18n_uchar *match_set );
+int32_t i18n_ustring_spn(const i18n_uchar *string, const i18n_uchar *match_set);
/**
* @brief The string tokenizer API allows an application to break a string into tokens.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_tokenizer_r ( i18n_uchar *src, const i18n_uchar *delim, i18n_uchar **save_state );
+i18n_uchar* i18n_ustring_tokenizer_r(i18n_uchar *src, const i18n_uchar *delim, i18n_uchar **save_state);
/**
* @brief Compares two Unicode strings for bitwise equality (code unit order).
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_compare ( const i18n_uchar *s1, const i18n_uchar *s2 );
+int32_t i18n_ustring_compare(const i18n_uchar *s1, const i18n_uchar *s2);
/**
* @brief Compare two Unicode strings in code point order.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_compare_code_point_order( const i18n_uchar *s1, const i18n_uchar *s2 );
+int32_t i18n_ustring_compare_code_point_order(const i18n_uchar *s1, const i18n_uchar *s2);
/**
* @brief Compare two Unicode strings (binary order).
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_compare_binary_order( const i18n_uchar *s1, int32_t length1, const i18n_uchar *s2, int32_t length2, i18n_ubool code_point_order );
+int32_t i18n_ustring_compare_binary_order(const i18n_uchar *s1, int32_t length1, const i18n_uchar *s2, int32_t length2, i18n_ubool code_point_order);
/**
* @brief Compare two strings case-insensitively using full case folding.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_case_compare_with_length( const i18n_uchar *s1, int32_t length1, const i18n_uchar *s2, int32_t length2, uint32_t options, i18n_error_code_e *error_code );
+int32_t i18n_ustring_case_compare_with_length(const i18n_uchar *s1, int32_t length1, const i18n_uchar *s2, int32_t length2, uint32_t options, i18n_error_code_e *error_code);
/**
* @brief Compare two ustrings for bitwise equality.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_compare_n( const i18n_uchar *s1, const i18n_uchar *s2, int32_t n );
+int32_t i18n_ustring_compare_n(const i18n_uchar *s1, const i18n_uchar *s2, int32_t n);
/**
* @brief Compare two Unicode strings in code point order.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_compare_n_code_point_order( const i18n_uchar *s1, const i18n_uchar *s2, int32_t n );
+int32_t i18n_ustring_compare_n_code_point_order(const i18n_uchar *s1, const i18n_uchar *s2, int32_t n);
/**
* @brief Compare two strings case-insensitively using full case folding.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_case_compare( const i18n_uchar *s1, const i18n_uchar *s2, uint32_t options );
+int32_t i18n_ustring_case_compare(const i18n_uchar *s1, const i18n_uchar *s2, uint32_t options);
/**
* @brief Compare two strings case-insensitively using full case folding.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_case_compare_n( const i18n_uchar *s1, const i18n_uchar *s2, int32_t n, uint32_t options );
+int32_t i18n_ustring_case_compare_n(const i18n_uchar *s1, const i18n_uchar *s2, int32_t n, uint32_t options);
/**
* @brief Compare two strings case-insensitively using full case folding.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_mem_case_compare( const i18n_uchar *s1, const i18n_uchar *s2, int32_t length, uint32_t options );
+int32_t i18n_ustring_mem_case_compare(const i18n_uchar *s1, const i18n_uchar *s2, int32_t length, uint32_t options);
/**
* @brief Copies a ustring. Adds a NULL terminator.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_copy ( i18n_uchar *dest, const i18n_uchar *src );
+i18n_uchar* i18n_ustring_copy(i18n_uchar *dest, const i18n_uchar *src);
/**
* @brief Copies a ustring.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_copy_n ( i18n_uchar *dest, const i18n_uchar *src, int32_t n );
+i18n_uchar* i18n_ustring_copy_n(i18n_uchar *dest, const i18n_uchar *src, int32_t n);
/**
* @brief Copies a byte string encoded in the default codepage to a ustring.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_copy_ua ( i18n_uchar *dest, const char *src );
+i18n_uchar* i18n_ustring_copy_ua(i18n_uchar *dest, const char *src);
/**
* @brief Copies a byte string encoded in the default codepage to a ustring.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_copy_ua_n ( i18n_uchar *dest, const char *src, int32_t n );
+i18n_uchar* i18n_ustring_copy_ua_n(i18n_uchar *dest, const char *src, int32_t n);
/**
* @brief Copies a ustring to a byte string encoded in the default codepage.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-char* i18n_ustring_copy_au ( char *dest, const i18n_uchar *src );
+char* i18n_ustring_copy_au(char *dest, const i18n_uchar *src);
/**
* @brief Copies a ustring to a byte string encoded in the default codepage.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-char* i18n_ustring_copy_au_n ( char *dest, const i18n_uchar *src, int32_t n );
+char* i18n_ustring_copy_au_n(char *dest, const i18n_uchar *src, int32_t n);
/**
* @brief Synonym for memcpy(), but with #i18n_uchar characters only.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_mem_copy ( i18n_uchar *dest, const i18n_uchar *src, int32_t count );
+i18n_uchar* i18n_ustring_mem_copy(i18n_uchar *dest, const i18n_uchar *src, int32_t count);
/**
* @brief Synonym for memmove(), but with #i18n_uchar characters only.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_mem_move ( i18n_uchar *dest, const i18n_uchar *src, int32_t count );
+i18n_uchar* i18n_ustring_mem_move(i18n_uchar *dest, const i18n_uchar *src, int32_t count);
/**
* @brief Initialize count characters of dest to c.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_mem_set ( i18n_uchar *dest, const i18n_uchar c, int32_t count );
+i18n_uchar* i18n_ustring_mem_set(i18n_uchar *dest, const i18n_uchar c, int32_t count);
/**
* @brief Compare the first count #i18n_uchar characters of each buffer.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_mem_compare ( const i18n_uchar *buf1, const i18n_uchar *buf2, int32_t count );
+int32_t i18n_ustring_mem_compare(const i18n_uchar *buf1, const i18n_uchar *buf2, int32_t count);
/**
* @brief Compare two Unicode strings in code point order.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_mem_compare_code_point_order ( const i18n_uchar *s1, const i18n_uchar *s2, int32_t count );
+int32_t i18n_ustring_mem_compare_code_point_order(const i18n_uchar *s1, const i18n_uchar *s2, int32_t count);
/**
* @brief Finds the first occurrence of a BMP code point in a string.
* @see i18n_ustring_mem_char32()
* @see i18n_ustring_find_first()
*/
-i18n_uchar* i18n_ustring_mem_char ( const i18n_uchar *s, i18n_uchar c, int32_t count );
+i18n_uchar* i18n_ustring_mem_char(const i18n_uchar *s, i18n_uchar c, int32_t count);
/**
* @brief Finds the first occurrence of a code point in a string.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_mem_char32 ( const i18n_uchar *s, i18n_uchar32 c, int32_t count );
+i18n_uchar* i18n_ustring_mem_char32(const i18n_uchar *s, i18n_uchar32 c, int32_t count);
/**
* @brief Finds the last occurrence of a BMP code point in a string.
* @see #i18n_ustring_mem_r_char32
* @see #i18n_ustring_find_last
*/
-i18n_uchar* i18n_ustring_mem_r_char ( const i18n_uchar *s, i18n_uchar c, int32_t count );
+i18n_uchar* i18n_ustring_mem_r_char(const i18n_uchar *s, i18n_uchar c, int32_t count);
/**
* @brief Finds the last occurrence of a code point in a string.
* @see #i18n_ustring_mem_r_char
* @see #i18n_ustring_find_last
*/
-i18n_uchar* i18n_ustring_mem_r_char32 ( const i18n_uchar *s, i18n_uchar32 c, int32_t count );
+i18n_uchar* i18n_ustring_mem_r_char32(const i18n_uchar *s, i18n_uchar32 c, int32_t count);
/**
* @brief Unescape a string of characters and write the resulting Unicode characters to the destination buffer.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ustring_unescape_at()
*/
-int32_t i18n_ustring_unescape ( const char *src, i18n_uchar *dest, int32_t dest_capacity );
+int32_t i18n_ustring_unescape(const char *src, i18n_uchar *dest, int32_t dest_capacity);
/**
* @brief Unescape a single sequence.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ustring_unescape()
*/
-i18n_uchar32 i18n_ustring_unescape_at ( i18n_ustring_unescape_char_at_cb char_at, int32_t *offset, int32_t length, void *context );
+i18n_uchar32 i18n_ustring_unescape_at(i18n_ustring_unescape_char_at_cb char_at, int32_t *offset, int32_t length, void *context);
/**
* @brief Uppercases the characters in a string.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_to_upper ( i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, const char *locale, i18n_error_code_e *error_code );
+int32_t i18n_ustring_to_upper(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, const char *locale, i18n_error_code_e *error_code);
/**
* @brief Lowercase the characters in a string.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_to_lower ( i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, const char *locale, i18n_error_code_e *error_code );
+int32_t i18n_ustring_to_lower(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, const char *locale, i18n_error_code_e *error_code);
/**
* @brief Titlecases a string.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ustring_to_title()
*/
-int32_t i18n_ustring_to_title_new ( i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, i18n_ubreak_iterator_h title_iter, const char *locale);
+int32_t i18n_ustring_to_title_new(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, i18n_ubreak_iterator_h title_iter, const char *locale);
/**
* @brief Case-folds the characters in a string.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-int32_t i18n_ustring_fold_case ( i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, uint32_t options, i18n_error_code_e *error_code );
+int32_t i18n_ustring_fold_case(i18n_uchar *dest, int32_t dest_capacity, const i18n_uchar *src, int32_t src_len, uint32_t options, i18n_error_code_e *error_code);
/**
* @brief Convert a UTF-16 string to a wchar_t string.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-wchar_t* i18n_ustring_to_WCS ( wchar_t *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code );
+wchar_t* i18n_ustring_to_WCS(wchar_t *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code);
/**
* @brief Convert a wchar_t string to UTF-16.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_from_WCS ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const wchar_t *src, int32_t src_len, i18n_error_code_e *error_code );
+i18n_uchar* i18n_ustring_from_WCS(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const wchar_t *src, int32_t src_len, i18n_error_code_e *error_code);
/**
* @brief Converts a UTF-16 string to UTF-8.
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
* @see i18n_ustring_from_UTF8()
*/
-char* i18n_ustring_to_UTF8 ( char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code );
+char* i18n_ustring_to_UTF8(char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code);
/**
* @brief Converts a UTF-8 string to UTF-16.
* @exception #I18N_ERROR_NONE Success
* @exception #I18N_ERROR_INVALID_PARAMETER Invalid function parameter
*/
-i18n_uchar* i18n_ustring_from_UTF8 ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code );
+i18n_uchar* i18n_ustring_from_UTF8(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code);
/**
* @brief Convert a UTF-16 string to UTF-8.
* @see i18n_ustring_to_UTF8()
* @see i18n_ustring_from_UTF8_with_sub()
*/
-char* i18n_ustring_to_UTF8_with_sub ( char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code );
+char* i18n_ustring_to_UTF8_with_sub(char *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code);
/**
* @brief Convert a UTF-8 string to UTF-16.
* @see i18n_ustring_from_UTF8_lenient()
* @see i18n_ustring_to_UTF8_with_sub()
*/
-i18n_uchar* i18n_ustring_from_UTF8_with_sub ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_uchar32 sub_char,
- int32_t *num_substitutions, i18n_error_code_e *error_code );
+i18n_uchar* i18n_ustring_from_UTF8_with_sub(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_uchar32 sub_char,
+ int32_t *num_substitutions, i18n_error_code_e *error_code);
/**
* @brief Convert a UTF-8 string to UTF-16.
* @see i18n_ustring_to_UTF8_with_sub()
* @see i18n_ustring_from_UTF8_with_sub()
*/
-i18n_uchar* i18n_ustring_from_UTF8_lenient ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code );
+i18n_uchar* i18n_ustring_from_UTF8_lenient(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const char *src, int32_t src_len, i18n_error_code_e *error_code);
/**
* @brief Convert a UTF-16 string to UTF-32.
* @see i18n_ustring_to_UTF32_with_sub()
* @see i18n_ustring_from_UTF32()
*/
-i18n_uchar32* i18n_ustring_to_UTF32 ( i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code );
+i18n_uchar32* i18n_ustring_to_UTF32(i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len, i18n_error_code_e *error_code);
/**
* @brief Convert a UTF-32 string to UTF-16.
* @see i18n_ustring_from_UTF32_with_sub()
* @see i18n_ustring_to_UTF32()
*/
-i18n_uchar* i18n_ustring_from_UTF32 ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_error_code_e *error_code );
+i18n_uchar* i18n_ustring_from_UTF32(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_error_code_e *error_code);
/**
* @brief Convert a UTF-16 string to UTF-32.
* @see i18n_ustring_to_UTF32()
* @see i18n_ustring_from_UTF32_with_sub()
*/
-i18n_uchar32* i18n_ustring_to_UTF32_with_sub ( i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len,
- i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code );
+i18n_uchar32* i18n_ustring_to_UTF32_with_sub(i18n_uchar32 *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar *src, int32_t src_len,
+ i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code);
/**
* @brief Convert a UTF-32 string to UTF-16.
* @see i18n_ustring_from_UTF32()
* @see i18n_ustring_to_UTF32_with_sub()
*/
-i18n_uchar* i18n_ustring_from_UTF32_with_sub ( i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code );
+i18n_uchar* i18n_ustring_from_UTF32_with_sub(i18n_uchar *dest, int32_t dest_capacity, int32_t *dest_len, const i18n_uchar32 *src, int32_t src_len, i18n_uchar32 sub_char, int32_t *num_substitutions, i18n_error_code_e *error_code);
#ifdef __cplusplus
}