Name Description Size
alphaindex.h Copyright (C) 2011-2014 International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** 27176
basictz.h Copyright (C) 2007-2013, International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** 10228
calendar.h Copyright (C) 1997-2014, International Business Machines Corporation and others. All Rights Reserved. ******************************************************************************* File CALENDAR.H Modification History: Date Name Description 04/22/97 aliu Expanded and corrected comments and other header contents. 05/01/97 aliu Made equals(), before(), after() arguments const. 05/20/97 aliu Replaced fAreFieldsSet with fAreFieldsInSync and fAreAllFieldsSet. 07/27/98 stephen Sync up with JDK 1.2 11/15/99 weiv added YEAR_WOY and DOW_LOCAL to EDateFields 8/19/2002 srl Removed Javaisms 11/07/2003 srl Update, clean up documentation. ******************************************************************************* 109003
choicfmt.h Copyright (C) 1997-2013, International Business Machines Corporation and others. All Rights Reserved. ******************************************************************************* File CHOICFMT.H Modification History: Date Name Description 02/19/97 aliu Converted from java. 03/20/97 helena Finished first cut of implementation and got rid of nextDouble/previousDouble and replaced with boolean array. 4/10/97 aliu Clean up. Modified to work on AIX. 8/6/97 nos Removed overloaded constructor, member var 'buffer'. 07/22/98 stephen Removed operator!= (implemented in Format) ******************************************************************************* 24571
coleitr.h Copyright (C) 1997-2014, International Business Machines Corporation and others. All Rights Reserved. ***************************************************************************** 14109
coll.h Copyright (C) 1996-2016, International Business Machines Corporation and others. All Rights Reserved. ***************************************************************************** 57651
compactdecimalformat.h Copyright (C) 2012-2016, International Business Machines Corporation and others. All Rights Reserved. ******************************************************************************* File COMPACTDECIMALFORMAT.H ******************************************************************************* 7041
curramt.h Copyright (c) 2004-2006, International Business Machines Corporation and others. All Rights Reserved. ********************************************************************* Author: Alan Liu Created: April 26, 2004 Since: ICU 3.0 ********************************************************************* 3756
currpinf.h Copyright (C) 2009-2015, International Business Machines Corporation and * others. All Rights Reserved. * ****************************************************************************** 7479
currunit.h Copyright (c) 2004-2014, International Business Machines Corporation and others. All Rights Reserved. ********************************************************************* Author: Alan Liu Created: April 26, 2004 Since: ICU 3.0 ********************************************************************* 4115
datefmt.h Copyright (C) 1997-2016, International Business Machines Corporation and others. All Rights Reserved. ******************************************************************************* File DATEFMT.H Modification History: Date Name Description 02/19/97 aliu Converted from java. 04/01/97 aliu Added support for centuries. 07/23/98 stephen JDK 1.2 sync 11/15/99 weiv Added support for week of year/day of week formatting ******************************************************************************* 41699
dcfmtsym.h Copyright (C) 1997-2016, International Business Machines Corporation and others. All Rights Reserved. ******************************************************************************* File DCFMTSYM.H Modification History: Date Name Description 02/19/97 aliu Converted from java. 03/18/97 clhuang Updated per C++ implementation. 03/27/97 helena Updated to pass the simple test after code review. 08/26/97 aliu Added currency/intl currency symbol support. 07/22/98 stephen Changed to match C++ style currencySymbol -> fCurrencySymbol Constants changed from CAPS to kCaps 06/24/99 helena Integrated Alan's NF enhancements and Java2 bug fixes 09/22/00 grhoten Marked deprecation tags with a pointer to replacement functions. ******************************************************************************* 21445
decimfmt.h Copyright (C) 1997-2016, International Business Machines Corporation and others. All Rights Reserved. ******************************************************************************* File DECIMFMT.H Modification History: Date Name Description 02/19/97 aliu Converted from java. 03/20/97 clhuang Updated per C++ implementation. 04/03/97 aliu Rewrote parsing and formatting completely, and cleaned up and debugged. Actually works now. 04/17/97 aliu Changed DigitCount to int per code review. 07/10/97 helena Made ParsePosition a class and get rid of the function hiding problems. 09/09/97 aliu Ported over support for exponential formats. 07/20/98 stephen Changed documentation 01/30/13 emmons Added Scaling methods ******************************************************************************* 89641
displayoptions.h \file \brief C++ API: Display options class This class is designed as a more modern version of the UDisplayContext mechanism. 7284
dtfmtsym.h Copyright (C) 1997-2016, International Business Machines Corporation and others. All Rights Reserved. ******************************************************************************* File DTFMTSYM.H Modification History: Date Name Description 02/19/97 aliu Converted from java. 07/21/98 stephen Added getZoneIndex() Changed to match C++ conventions ******************************************************************************* 39148
dtitvfmt.h Copyright (C) 2008-2016, International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** File DTITVFMT.H ****************************************************************************** 50443
dtitvinf.h Copyright (C) 2008-2016, International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** File DTITVINF.H ****************************************************************************** 19079
dtptngen.h Copyright (C) 2007-2016, International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** File DTPTNGEN.H ****************************************************************************** 29327
dtrule.h Copyright (C) 2007-2008, International Business Machines Corporation and * others. All Rights Reserved. * ****************************************************************************** 8898
fieldpos.h Copyright (C) 1997-2006, International Business Machines Corporation and others. All Rights Reserved. ******************************************************************************* File FIELDPOS.H Modification History: Date Name Description 02/25/97 aliu Converted from java. 03/17/97 clhuang Updated per Format implementation. 07/17/98 stephen Added default/copy ctors, and operators =, ==, != ******************************************************************************* 8909
fmtable.h Copyright (C) 1997-2014, International Business Machines Corporation and others. All Rights Reserved. ******************************************************************************* File FMTABLE.H Modification History: Date Name Description 02/29/97 aliu Creation. ******************************************************************************* 25035
format.h Copyright (C) 1997-2011, International Business Machines Corporation and others. All Rights Reserved. ******************************************************************************* File FORMAT.H Modification History: Date Name Description 02/19/97 aliu Converted from java. 03/17/97 clhuang Updated per C++ implementation. 03/27/97 helena Updated to pass the simple test after code review. ******************************************************************************* 12802
formattednumber.h \file \brief C API: Formatted number result from various number formatting functions. See also {@link icu::FormattedValue} for additional things you can do with a FormattedNumber. 6352
formattedvalue.h \file \brief C++ API: Abstract operations for localized strings. This file contains declarations for classes that deal with formatted strings. A number of APIs throughout ICU use these classes for expressing their localized output. 9987
fpositer.h Copyright (C) 2010-2012, International Business Machines Corporation and others. All Rights Reserved. ******************************************************************************* File attiter.h Modification History: Date Name Description 12/15/2009 dougfelt Created ******************************************************************************* 3107
gender.h Copyright (C) 2008-2013, International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** File GENDER.H Modification History:* Date Name Description ******************************************************************************* 3426
gregocal.h Copyright (C) 1997-2013, International Business Machines Corporation and others. All Rights Reserved. ******************************************************************************* File GREGOCAL.H Modification History: Date Name Description 04/22/97 aliu Overhauled header. 07/28/98 stephen Sync with JDK 1.2 09/04/98 stephen Re-sync with JDK 8/31 putback 09/14/98 stephen Changed type of kOneDay, kOneWeek to double. Fixed bug in roll() 10/15/99 aliu Fixed j31, incorrect WEEK_OF_YEAR computation. Added documentation of WEEK_OF_YEAR computation. 10/15/99 aliu Fixed j32, cannot set date to Feb 29 2000 AD. {JDK bug 4210209 4209272} 11/07/2003 srl Update, clean up documentation. ******************************************************************************* 31316
listformatter.h Copyright (C) 2012-2016, International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** file name: listformatter.h encoding: UTF-8 tab size: 8 (not used) indentation:4 created on: 20120426 created by: Umesh P. Nair 8799
measfmt.h Copyright (c) 2004-2016, International Business Machines Corporation and others. All Rights Reserved. ********************************************************************* Author: Alan Liu Created: April 20, 2004 Since: ICU 3.0 ********************************************************************* 11696
measunit.h Copyright (c) 2004-2016, International Business Machines Corporation and others. All Rights Reserved. ********************************************************************* Author: Alan Liu Created: April 26, 2004 Since: ICU 3.0 ********************************************************************* 109399
measure.h Copyright (c) 2004-2015, International Business Machines Corporation and others. All Rights Reserved. ********************************************************************* Author: Alan Liu Created: April 26, 2004 Since: ICU 3.0 ********************************************************************* 4434
msgfmt.h Copyright (C) 2007-2013, International Business Machines Corporation and others. All Rights Reserved. ******************************************************************************* File MSGFMT.H Modification History: Date Name Description 02/19/97 aliu Converted from java. 03/20/97 helena Finished first cut of implementation. 07/22/98 stephen Removed operator!= (defined in Format) 08/19/2002 srl Removing Javaisms ***************************************************************************** 45272
nounit.h Copyright (C) 2009-2017, International Business Machines Corporation, * Google, and others. All Rights Reserved. * ****************************************************************************** 2305
numberformatter.h \file \brief C++ API: All-in-one formatter for localized numbers, currencies, and units. For a full list of options, see icu::number::NumberFormatterSettings. <pre> // Most basic usage: NumberFormatter::withLocale(...).format(123).toString(); // 1,234 in en-US // Custom notation, unit, and rounding precision: NumberFormatter::with() .notation(Notation::compactShort()) .unit(CurrencyUnit("EUR", status)) .precision(Precision::maxDigits(2)) .locale(...) .format(1234) .toString(); // €1.2K in en-US // Create a formatter in a singleton by value for use later: static const LocalizedNumberFormatter formatter = NumberFormatter::withLocale(...) .unit(NoUnit::percent()) .precision(Precision::fixedFraction(3)); formatter.format(5.9831).toString(); // 5.983% in en-US // Create a "template" in a singleton unique_ptr but without setting a locale until the call site: std::unique_ptr<UnlocalizedNumberFormatter> template = NumberFormatter::with() .sign(UNumberSignDisplay::UNUM_SIGN_ALWAYS) .unit(MeasureUnit::getMeter()) .unitWidth(UNumberUnitWidth::UNUM_UNIT_WIDTH_FULL_NAME) .clone(); template->locale(...).format(1234).toString(); // +1,234 meters in en-US </pre> <p> This API offers more features than DecimalFormat and is geared toward new users of ICU. <p> NumberFormatter instances (i.e., LocalizedNumberFormatter and UnlocalizedNumberFormatter) are immutable and thread safe. This means that invoking a configuration method has no effect on the receiving instance; you must store and use the new number formatter instance it returns instead. <pre> UnlocalizedNumberFormatter formatter = UnlocalizedNumberFormatter::with().notation(Notation::scientific()); formatter.precision(Precision.maxFraction(2)); // does nothing! formatter.locale(Locale.getEnglish()).format(9.8765).toString(); // prints "9.8765E0", not "9.88E0" </pre> <p> This API is based on the <em>fluent</em> design pattern popularized by libraries such as Google's Guava. For extensive details on the design of this API, read <a href="https://goo.gl/szi5VB">the design doc</a>. @author Shane Carr 92133
numberrangeformatter.h \file \brief C++ API: Library for localized formatting of number, currency, and unit ranges. The main entrypoint to the formatting of ranges of numbers, including currencies and other units of measurement. <p> Usage example: <p> <pre> NumberRangeFormatter::with() .identityFallback(UNUM_IDENTITY_FALLBACK_APPROXIMATELY_OR_SINGLE_VALUE) .numberFormatterFirst(NumberFormatter::with().adoptUnit(MeasureUnit::createMeter())) .numberFormatterSecond(NumberFormatter::with().adoptUnit(MeasureUnit::createKilometer())) .locale("en-GB") .formatFormattableRange(750, 1.2, status) .toString(status); // => "750 m - 1.2 km" </pre> <p> Like NumberFormatter, NumberRangeFormatter instances (i.e., LocalizedNumberRangeFormatter and UnlocalizedNumberRangeFormatter) are immutable and thread-safe. This API is based on the <em>fluent</em> design pattern popularized by libraries such as Google's Guava. @author Shane Carr 26066
numfmt.h Copyright (C) 1997-2016, International Business Machines Corporation and others. All Rights Reserved. ******************************************************************************* File NUMFMT.H Modification History: Date Name Description 02/19/97 aliu Converted from java. 03/18/97 clhuang Updated per C++ implementation. 04/17/97 aliu Changed DigitCount to int per code review. 07/20/98 stephen JDK 1.2 sync up. Added scientific support. Changed naming conventions to match C++ guidelines Deprecated Java style constants (eg, INTEGER_FIELD) ******************************************************************************* 51463
numsys.h Copyright (C) 2010-2014, International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** File NUMSYS.H Modification History:* Date Name Description ******************************************************************************* 7401
plurfmt.h Copyright (C) 2007-2014, International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** File PLURFMT.H ******************************************************************************* 25859
plurrule.h Copyright (C) 2008-2015, International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** File PLURRULE.H Modification History:* Date Name Description ******************************************************************************* 21132
rbnf.h Copyright (C) 1997-2015, International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** 51024
rbtz.h Copyright (C) 2007-2013, International Business Machines Corporation and * others. All Rights Reserved. * ****************************************************************************** 16147
regex.h Copyright (C) 2002-2016, International Business Machines Corporation and others. All Rights Reserved. ********************************************************************* file name: regex.h encoding: UTF-8 indentation:4 created on: 2002oct22 created by: Andy Heninger ICU Regular Expressions, API for C++ 86481
region.h Copyright (C) 2014-2016, International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** 9417
reldatefmt.h Copyright (C) 2014-2016, International Business Machines Corporation and others. All Rights Reserved. **************************************************************************** File RELDATEFMT.H **************************************************************************** 22894
scientificnumberformatter.h Copyright (c) 2014-2016, International Business Machines Corporation and others. All Rights Reserved. ********************************************************************* 6598
search.h Copyright (C) 2001-2011 IBM and others. All rights reserved. ********************************************************************* Date Name Description 03/22/2000 helena Creation. ********************************************************************* 22771
selfmt.h COPYRIGHT: Copyright (c) 1997-2011, International Business Machines Corporation and others. All Rights Reserved. Copyright (C) 2010 , Yahoo! Inc. ******************************************************************* File SELFMT.H Modification History: Date Name Description 11/11/09 kirtig Finished first cut of implementation. ****************************************************************** 14695
simplenumberformatter.h \file \brief C++ API: Simple number formatting focused on low memory and code size. These functions render locale-aware number strings but without the bells and whistles found in other number formatting APIs such as those in numberformatter.h, like units and currencies. <pre> SimpleNumberFormatter snf = SimpleNumberFormatter::forLocale("de-CH", status); FormattedNumber result = snf.formatInt64(-1000007, status); assertEquals("", u"-1’000’007", result.toString(status)); </pre> 9093
simpletz.h Copyright (C) 1997-2013, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* File SIMPLETZ.H Modification History: Date Name Description 04/21/97 aliu Overhauled header. 08/10/98 stephen JDK 1.2 sync Added setStartRule() / setEndRule() overloads Added hasSameRules() 09/02/98 stephen Added getOffset(monthLen) Changed getOffset() to take UErrorCode 07/09/99 stephen Removed millisPerHour (unused, for HP compiler) 12/02/99 aliu Added TimeMode and constructor and setStart/EndRule methods that take TimeMode. Added to docs. ******************************************************************************* 46744
smpdtfmt.h Copyright (C) 1997-2016, International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** File SMPDTFMT.H Modification History: Date Name Description 02/19/97 aliu Converted from java. 07/09/97 helena Make ParsePosition into a class. 07/21/98 stephen Added GMT_PLUS, GMT_MINUS Changed setTwoDigitStartDate to set2DigitYearStart Changed getTwoDigitStartDate to get2DigitYearStart Removed subParseLong Removed getZoneIndex (added in DateFormatSymbols) 06/14/99 stephen Removed fgTimeZoneDataSuffix 10/14/99 aliu Updated class doc to describe 2-digit year parsing {j28 4182066}. ****************************************************************************** 73570
sortkey.h Copyright (C) 1996-2014, International Business Machines Corporation and others. All Rights Reserved. **************************************************************************** File sortkey.h Created by: Helena Shih Modification History: Date Name Description 6/20/97 helena Java class name change. 8/18/97 helena Added internal API documentation. 6/26/98 erm Changed to use byte arrays and memcmp. **************************************************************************** 11455
stsearch.h Copyright (C) 2001-2014 IBM and others. All rights reserved. ********************************************************************* Date Name Description 03/22/2000 helena Creation. ********************************************************************* 21954
tblcoll.h Copyright (C) 1996-2016, International Business Machines Corporation and others. All Rights Reserved. ***************************************************************************** 37823
timezone.h Copyright (c) 1997-2016, International Business Machines Corporation and others. All Rights Reserved. ************************************************************************* File TIMEZONE.H Modification History: Date Name Description 04/21/97 aliu Overhauled header. 07/09/97 helena Changed createInstance to createDefault. 08/06/97 aliu Removed dependency on internal header for Hashtable. 08/10/98 stephen Changed getDisplayName() API conventions to match 08/19/98 stephen Changed createTimeZone() to never return 0 09/02/98 stephen Sync to JDK 1.2 8/31 - Added getOffset(... monthlen ...) - Added hasSameRules() 09/15/98 stephen Added getStaticClassID 12/03/99 aliu Moved data out of static table into icudata.dll. Hashtable replaced by new static data structures. 12/14/99 aliu Made GMT public. 08/15/01 grhoten Made GMT private and added the getGMT() function ************************************************************************* 44895
tmunit.h Copyright (C) 2009-2016, International Business Machines Corporation, * Google, and others. All Rights Reserved. * ****************************************************************************** 3479
tmutamt.h Copyright (C) 2009-2010, Google, International Business Machines Corporation and * others. All Rights Reserved. * ****************************************************************************** 5029
tmutfmt.h Copyright (C) 2008-2014, Google, International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** 7602
translit.h Copyright (C) 1999-2014, International Business Machines Corporation and others. All Rights Reserved. ********************************************************************* Date Name Description 11/17/99 aliu Creation. ********************************************************************* 67415
tzfmt.h Copyright (C) 2011-2015, International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** 43988
tznames.h Copyright (C) 2011-2016, International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** 17254
tzrule.h Copyright (C) 2007-2008, International Business Machines Corporation and * others. All Rights Reserved. * ****************************************************************************** 35698
tztrans.h Copyright (C) 2007-2008, International Business Machines Corporation and * others. All Rights Reserved. * ****************************************************************************** 6278
ucal.h Copyright (C) 1996-2015, International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** 63949
ucol.h Copyright (c) 1996-2015, International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** 63441
ucoleitr.h Copyright (C) 2001-2014, International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** File ucoleitr.h Modification History: Date Name Description 02/15/2001 synwee Modified all methods to process its own function instead of calling the equivalent c++ api (coleitr.h) ***************************************************************************** 10056
ucsdet.h Copyright (C) 2005-2013, International Business Machines Corporation and others. All Rights Reserved. ********************************************************************* file name: ucsdet.h encoding: UTF-8 indentation:4 created on: 2005Aug04 created by: Andy Heninger ICU Character Set Detection, API for C Draft version 18 Oct 2005 15043
udat.h Copyright (C) 1996-2016, International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** 63852
udateintervalformat.h Copyright (C) 2010-2012,2015 International Business Machines Corporation and others. All Rights Reserved. **************************************************************************************** 12218
udatpg.h Copyright (C) 2007-2015, International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** file name: udatpg.h encoding: UTF-8 tab size: 8 (not used) indentation:4 created on: 2007jul30 created by: Markus W. Scherer 30855
udisplayoptions.h \file \brief C API: Display options (enum types, values, helper functions) These display options are designed to be used in class DisplayOptions as a more modern version of the UDisplayContext mechanism. 9013
ufieldpositer.h Copyright (C) 2015-2016, International Business Machines Corporation and others. All Rights Reserved. **************************************************************************************** 4513
uformattable.h Copyright (C) 2013-2014, International Business Machines Corporation and others. All Rights Reserved. ******************************************************************************* File UFORMATTABLE.H Modification History: Date Name Description 2013 Jun 7 srl New ******************************************************************************* 11233
uformattednumber.h \file \brief C API: Formatted number result from various number formatting functions. Create a `UFormattedNumber` to hold the result of a number formatting operation. The same `UFormattedNumber` can be reused multiple times. <pre> LocalUFormattedNumberPointer uresult(unumf_openResult(status)); // pass uresult.getAlias() to your number formatter int32_t length; const UChar* s = ufmtval_getString(unumf_resultAsValue(uresult.getAlias(), status), &length, status)); // The string result is in `s` with the given `length` (it is also NUL-terminated). </pre> 8281
uformattedvalue.h \file \brief C API: Abstract operations for localized strings. This file contains declarations for classes that deal with formatted strings. A number of APIs throughout ICU use these classes for expressing their localized output. 12549
ugender.h Copyright (C) 2010-2013, International Business Machines Corporation and others. All Rights Reserved. **************************************************************************************** 2106
ulistformatter.h Copyright (C) 2015-2016, International Business Machines Corporation and others. All Rights Reserved. **************************************************************************************** 11043
ulocdata.h Copyright (C) 2003-2015, International Business Machines * Corporation and others. All Rights Reserved. * * ***************************************************************************** file name: ulocdata.h encoding: UTF-8 tab size: 8 (not used) indentation:4 created on: 2003Oct21 created by: Ram Viswanadha 11572
umsg.h COPYRIGHT: Copyright (c) 1997-2011, International Business Machines Corporation and others. All Rights Reserved. Copyright (C) 2010 , Yahoo! Inc. ******************************************************************* file name: umsg.h encoding: UTF-8 tab size: 8 (not used) indentation:4 Change history: 08/5/2001 Ram Added C wrappers for C++ API. ****************************************************************** 24832
unirepl.h Copyright (c) 2002-2005, International Business Machines Corporation and others. All Rights Reserved. ********************************************************************* Date Name Description 01/14/2002 aliu Creation. ********************************************************************* 3464
unum.h Copyright (C) 1997-2015, International Business Machines Corporation and others. All Rights Reserved. Modification History: Date Name Description 06/24/99 helena Integrated Alan's NF enhancements and Java2 bug fixes ****************************************************************************** 56537
unumberformatter.h \file \brief C API: Localized number formatting; not recommended for C++. This is the C-compatible version of the NumberFormatter API introduced in ICU 60. C++ users should include unicode/numberformatter.h and use the proper C++ APIs. The C API accepts a number skeleton string for specifying the settings for formatting, which covers a very large subset of all possible number formatting features. For more information on number skeleton strings, see unicode/numberformatter.h. When using UNumberFormatter, which is treated as immutable, the results are exported to a mutable UFormattedNumber object, which you subsequently use for populating your string buffer or iterating over the fields. Example code: <pre> // Setup: UErrorCode ec = U_ZERO_ERROR; UNumberFormatter* uformatter = unumf_openForSkeletonAndLocale(u"precision-integer", -1, "en", &ec); UFormattedNumber* uresult = unumf_openResult(&ec); if (U_FAILURE(ec)) { return; } // Format a double: unumf_formatDouble(uformatter, 5142.3, uresult, &ec); if (U_FAILURE(ec)) { return; } // Export the string to a malloc'd buffer: int32_t len = unumf_resultToString(uresult, NULL, 0, &ec); // at this point, ec == U_BUFFER_OVERFLOW_ERROR ec = U_ZERO_ERROR; UChar* buffer = (UChar*) malloc((len+1)*sizeof(UChar)); unumf_resultToString(uresult, buffer, len+1, &ec); if (U_FAILURE(ec)) { return; } // buffer should equal "5,142" // Cleanup: unumf_close(uformatter); unumf_closeResult(uresult); free(buffer); </pre> If you are a C++ user linking against the C libraries, you can use the LocalPointer versions of these APIs. The following example uses LocalPointer with the decimal number and field position APIs: <pre> // Setup: LocalUNumberFormatterPointer uformatter(unumf_openForSkeletonAndLocale(u"percent", -1, "en", &ec)); LocalUFormattedNumberPointer uresult(unumf_openResult(&ec)); if (U_FAILURE(ec)) { return; } // Format a decimal number: unumf_formatDecimal(uformatter.getAlias(), "9.87E-3", -1, uresult.getAlias(), &ec); if (U_FAILURE(ec)) { return; } // Get the location of the percent sign: UFieldPosition ufpos = {UNUM_PERCENT_FIELD, 0, 0}; unumf_resultNextFieldPosition(uresult.getAlias(), &ufpos, &ec); // ufpos should contain beginIndex=7 and endIndex=8 since the string is "0.00987%" // No need to do any cleanup since we are using LocalPointer. </pre> 20153
unumberoptions.h \file \brief C API: Header-only input options for various number formatting APIs. You do not normally need to include this header file directly, because it is included in all files that use these enums. 5360
unumberrangeformatter.h \file \brief C API: Localized number range formatting This is the C-compatible version of the NumberRangeFormatter API. C++ users should include unicode/numberrangeformatter.h and use the proper C++ APIs. First create a UNumberRangeFormatter, which is immutable, and then format to a UFormattedNumberRange. Example code: <pre> // Setup: UErrorCode ec = U_ZERO_ERROR; UNumberRangeFormatter* uformatter = unumrf_openForSkeletonCollapseIdentityFallbackAndLocaleWithError( u"currency/USD precision-integer", -1, UNUM_RANGE_COLLAPSE_AUTO, UNUM_IDENTITY_FALLBACK_APPROXIMATELY, "en-US", NULL, &ec); UFormattedNumberRange* uresult = unumrf_openResult(&ec); if (U_FAILURE(ec)) { return; } // Format a double range: unumrf_formatDoubleRange(uformatter, 3.0, 5.0, uresult, &ec); if (U_FAILURE(ec)) { return; } // Get the result string: int32_t len; const UChar* str = ufmtval_getString(unumrf_resultAsValue(uresult, &ec), &len, &ec); if (U_FAILURE(ec)) { return; } // str should equal "$3 – $5" // Cleanup: unumf_close(uformatter); unumf_closeResult(uresult); </pre> If you are a C++ user linking against the C libraries, you can use the LocalPointer versions of these APIs. The following example uses LocalPointer with the decimal number and field position APIs: <pre> // Setup: LocalUNumberRangeFormatterPointer uformatter( unumrf_openForSkeletonCollapseIdentityFallbackAndLocaleWithError(...)); LocalUFormattedNumberRangePointer uresult(unumrf_openResult(&ec)); if (U_FAILURE(ec)) { return; } // Format a double number range: unumrf_formatDoubleRange(uformatter.getAlias(), 3.0, 5.0, uresult.getAlias(), &ec); if (U_FAILURE(ec)) { return; } // No need to do any cleanup since we are using LocalPointer. </pre> You can also get field positions. For more information, see uformattedvalue.h. 15722
unumsys.h Copyright (C) 2013-2014, International Business Machines Corporation and others. All Rights Reserved. **************************************************************************************** 7430
upluralrules.h Copyright (C) 2010-2013, International Business Machines Corporation and others. All Rights Reserved. **************************************************************************************** 8997
uregex.h Copyright (C) 2004-2016, International Business Machines Corporation and others. All Rights Reserved. ********************************************************************* file name: uregex.h encoding: UTF-8 indentation:4 created on: 2004mar09 created by: Andy Heninger ICU Regular Expressions, API for C 73719
uregion.h Copyright (C) 2014, International Business Machines Corporation and others. All Rights Reserved. **************************************************************************************** 10047
ureldatefmt.h Copyright (C) 2016, International Business Machines Corporation and others. All Rights Reserved. **************************************************************************************** 17386
usearch.h Copyright (C) 2001-2011,2014 IBM and others. All rights reserved. ********************************************************************* Date Name Description 06/28/2001 synwee Creation. ********************************************************************* 40153
usimplenumberformatter.h \file \brief C API: Simple number formatting focused on low memory and code size. These functions render locale-aware number strings but without the bells and whistles found in other number formatting APIs such as those in unumberformatter.h, like units and currencies. Example using C++ helpers: <pre> LocalUSimpleNumberFormatterPointer uformatter(usnumf_openForLocale("de-CH", status)); LocalUFormattedNumberPointer uresult(unumf_openResult(status)); usnumf_formatInt64(uformatter.getAlias(), 55, uresult.getAlias(), status); assertEquals("", u"55", ufmtval_getString(unumf_resultAsValue(uresult.getAlias(), status), nullptr, status)); </pre> Example using pure C: <pre> UErrorCode ec = U_ZERO_ERROR; USimpleNumberFormatter* uformatter = usnumf_openForLocale("bn", &ec); USimpleNumber* unumber = usnum_openForInt64(1000007, &ec); UFormattedNumber* uresult = unumf_openResult(&ec); usnumf_format(uformatter, unumber, uresult, &ec); int32_t len; const UChar* str = ufmtval_getString(unumf_resultAsValue(uresult, &ec), &len, &ec); if (assertSuccess("Formatting end-to-end", &ec)) { assertUEquals("Should produce a result in Bangla digits", u"১০,০০,০০৭", str); } // Cleanup: unumf_closeResult(uresult); usnum_close(unumber); usnumf_close(uformatter); </pre> 7636
uspoof.h Copyright (C) 2008-2016, International Business Machines Corporation and others. All Rights Reserved. ************************************************************************** file name: uspoof.h encoding: UTF-8 tab size: 8 (not used) indentation:4 created on: 2008Feb13 created by: Andy Heninger Unicode Spoof Detection 67430
utmscale.h Copyright (C) 2004 - 2008, International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** 14107
utrans.h Copyright (C) 1997-2011,2014-2015 International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** Date Name Description 06/21/00 aliu Creation. ****************************************************************************** 26157
vtzone.h Copyright (C) 2007-2013, International Business Machines Corporation and others. All Rights Reserved. ****************************************************************************** 21188