pText = (i18n_uchar*)calloc(strlen(pTextSample) + 1, sizeof(i18n_uchar));
i18n_ustring_copy_ua(pText, pTextSample);
int nValue = -1;
-
- nValue = i18n_unumber_parse(num_format, pText, 16, NULL);
+
+ int32_t len = i18n_ustring_get_length(pText);
+ nValue = i18n_unumber_parse(num_format, pText, len, NULL);
int nRetVal = get_last_result();
PRINT_RESULT_CLEANUP(I18N_ERROR_NONE, nRetVal, "i18n_unumber_parse", BaseUtilsGetError(nRetVal),free(pText););
pText = (i18n_uchar*)calloc(strlen(pTextSample) + 1, sizeof(i18n_uchar));
i18n_ustring_copy_ua(pText, pTextSample);
int nLength = -1;
-
- nLength = i18n_unumber_parse_decimal(num_format, pText, 16, NULL, szResult, nResultCapacity);
+
+ int32_t len = i18n_ustring_get_length(pText);
+ nLength = i18n_unumber_parse_decimal(num_format, pText, len, NULL, szResult, nResultCapacity);
int nRetVal = get_last_result();
PRINT_RESULT_CLEANUP(I18N_ERROR_NONE, nRetVal, "i18n_unumber_parse_decimal", BaseUtilsGetError(nRetVal),free(pText));
CHECK_HANDLE_CLEANUP(szResult, "i18n_unumber_parse_decimal",free(pText));
0x32, 0x31, 0x30, 0x2E, 0x31, 0x32, 0x33, 0 };
int nValue = -1;
- nValue = i18n_unumber_parse_double(num_format, parse_double, 16, NULL);
+ int32_t len = i18n_ustring_get_length(parse_double);
+ nValue = i18n_unumber_parse_double(num_format, parse_double, len, NULL);
int nRetVal = get_last_result();
PRINT_RESULT(I18N_ERROR_NONE, nRetVal, "i18n_unumber_parse_decimal", BaseUtilsGetError(nRetVal));
int nRetVal = i18n_unumber_create(I18N_UNUMBER_CURRENCY, g_pDefaultTzid, nLength, g_pszDefaultLocale, NULL, &hNumFormat);
PRINT_RESULT(I18N_ERROR_NONE, nRetVal, "i18n_unumber_create", BaseUtilsGetError(nRetVal));
- dRet = i18n_unumber_parse_double_currency(hNumFormat, szText, 16, NULL, szCurrency);
+ int32_t len = i18n_ustring_get_length(szText);
+ dRet = i18n_unumber_parse_double_currency(hNumFormat, szText, len, NULL, szCurrency);
nRetVal = get_last_result();
PRINT_RESULT(I18N_ERROR_NONE, nRetVal, "i18n_unumber_parse_double_currency", BaseUtilsGetError(nRetVal));
i18n_ustring_copy_ua(pText, pTextSample);
int nValue = -1;
- nValue = i18n_unumber_parse_int64(num_format, pText, 16, NULL);
+ int32_t len = i18n_ustring_get_length(pText);
+ nValue = i18n_unumber_parse_int64(num_format, pText, len, NULL);
int nRetVal = get_last_result();
PRINT_RESULT_CLEANUP(I18N_ERROR_NONE, nRetVal, "i18n_unumber_parse_int64", BaseUtilsGetError(nRetVal),free(pText););