ICU 72.1 72.1
Namespaces | Data Structures | Typedefs | Enumerations | Functions | Variables
icu Namespace Reference

File coll.h. More...

Namespaces

namespace  NoUnit
 Dimensionless unit for percent and permille.
 

Data Structures

class  AlphabeticIndex
 AlphabeticIndex supports the creation of a UI index appropriate for a given language. More...
 
class  AnnualTimeZoneRule
 AnnualTimeZoneRule is a class used for representing a time zone rule which takes effect annually. More...
 
class  Appendable
 Base class for objects to which Unicode characters and strings can be appended. More...
 
class  BasicTimeZone
 BasicTimeZone is an abstract class extending TimeZone. More...
 
class  BreakIterator
 The BreakIterator class implements methods for finding the location of boundaries in text. More...
 
class  ByteSink
 A ByteSink can be filled with bytes. More...
 
class  BytesTrie
 Light-weight, non-const reader class for a BytesTrie. More...
 
class  BytesTrieBuilder
 Builder class for BytesTrie. More...
 
class  Calendar
 Calendar is an abstract base class for converting between a UDate object and a set of integer fields such as YEAR, MONTH, DAY, HOUR, and so on. More...
 
class  CanonicalIterator
 This class allows one to iterate through all the strings that are canonically equivalent to a given string. More...
 
class  CaseMap
 Low-level C++ case mapping functions. More...
 
class  Char16Ptr
 char16_t * wrapper with implicit conversion from distinct but bit-compatible pointer types. More...
 
class  CharacterIterator
 Abstract class that defines an API for iteration on text objects. More...
 
class  CheckedArrayByteSink
 Implementation of ByteSink that writes to a flat byte array, with bounds-checking: This sink will not write more than capacity bytes to outbuf. More...
 
class  ChoiceFormat
 ChoiceFormat converts between ranges of numeric values and strings for those ranges. More...
 
class  CollationElementIterator
 The CollationElementIterator class is used as an iterator to walk through
each character of an international string. More...
 
class  CollationKey
 Collation keys are generated by the Collator class. More...
 
class  Collator
 The Collator class performs locale-sensitive string comparison. More...
 
class  CollatorFactory
 A factory, used with registerFactory, the creates multiple collators and provides display names for them. More...
 
class  CompactDecimalFormat
 IMPORTANT: New users are strongly encouraged to see if numberformatter.h fits their use case. More...
 
class  ConstChar16Ptr
 const char16_t * wrapper with implicit conversion from distinct but bit-compatible pointer types. More...
 
class  ConstrainedFieldPosition
 Represents a span of a string containing a given field. More...
 
class  CurrencyAmount
 A currency together with a numeric amount, such as 200 USD. More...
 
class  CurrencyPluralInfo
 This class represents the information needed by DecimalFormat to format currency plural, such as "3.00 US dollars" or "1.00 US dollar". More...
 
class  CurrencyUnit
 A unit of currency, such as USD (U.S. More...
 
class  DateFormat
 DateFormat is an abstract class for a family of classes that convert dates and times from their internal representations to textual form and back again in a language-independent manner. More...
 
class  DateFormatSymbols
 DateFormatSymbols is a public class for encapsulating localizable date-time formatting data – including timezone data. More...
 
class  DateInterval
 This class represents a date interval. More...
 
class  DateIntervalFormat
 DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent manner. More...
 
class  DateIntervalInfo
 DateIntervalInfo is a public class for encapsulating localizable date time interval patterns. More...
 
class  DateTimePatternGenerator
 This class provides flexible generation of date format patterns, like "yy-MM-dd". More...
 
class  DateTimeRule
 DateTimeRule is a class representing a time in a year by a rule specified by month, day of month, day of week and time in the day. More...
 
class  DecimalFormat
 IMPORTANT: New users are strongly encouraged to see if numberformatter.h fits their use case. More...
 
class  DecimalFormatSymbols
 This class represents the set of symbols needed by DecimalFormat to format numbers. More...
 
class  DisplayOptions
 Represents all the display options that are supported by CLDR such as grammatical case, noun class, ... etc. More...
 
class  Edits
 Records lengths of string edits but not replacement text. More...
 
class  ErrorCode
 Wrapper class for UErrorCode, with conversion operators for direct use in ICU C and C++ APIs. More...
 
class  FieldPosition
 FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted output. More...
 
class  FieldPositionIterator
 FieldPositionIterator returns the field ids and their start/limit positions generated by a call to Format::format. More...
 
class  FilteredBreakIteratorBuilder
 The BreakIteratorFilter is used to modify the behavior of a BreakIterator by constructing a new BreakIterator which suppresses certain segment boundaries. More...
 
class  FilteredNormalizer2
 Normalization filtered by a UnicodeSet. More...
 
class  FontRuns
 The FontRuns class associates pointers to LEFontInstance objects with runs of text. More...
 
class  Format
 Base class for all formats. More...
 
class  Formattable
 Formattable objects can be passed to the Format class or its subclasses for formatting. More...
 
class  FormattedDateInterval
 An immutable class containing the result of a date interval formatting operation. More...
 
class  FormattedList
 An immutable class containing the result of a list formatting operation. More...
 
class  FormattedRelativeDateTime
 An immutable class containing the result of a relative datetime formatting operation. More...
 
class  FormattedValue
 An abstract formatted value: a string with associated field attributes. More...
 
class  ForwardCharacterIterator
 Abstract class that defines an API for forward-only iteration on text objects. More...
 
class  GenderInfo
 GenderInfo computes the gender of a list as a whole given the gender of each element. More...
 
class  GregorianCalendar
 Concrete class which provides the standard calendar used by most of the world. More...
 
class  IDNA
 Abstract base class for IDNA processing. More...
 
class  IDNAInfo
 Output container for IDNA processing errors. More...
 
class  InitialTimeZoneRule
 InitialTimeZoneRule represents a time zone rule representing a time zone effective from the beginning and has no actual start times. More...
 
class  ListFormatter
 An immutable class for formatting a list, using data from CLDR (or supplied separately). More...
 
class  LocalArray
 "Smart pointer" class, deletes objects via the C++ array delete[] operator. More...
 
class  Locale
 A Locale object represents a specific geographical, political, or cultural region. More...
 
class  LocaleBuilder
 LocaleBuilder is used to build instances of Locale from values configured by the setters. More...
 
class  LocaleDisplayNames
 Returns display names of Locales and components of Locales. More...
 
class  LocaleMatcher
 Immutable class that picks the best match between a user's desired locales and an application's supported locales. More...
 
class  LocaleRuns
 The LocaleRuns class associates pointers to Locale objects with runs of text. More...
 
class  LocalPointer
 "Smart pointer" class, deletes objects via the standard C++ delete operator. More...
 
class  LocalPointerBase
 "Smart pointer" base class; do not use directly: use LocalPointer etc. More...
 
class  Measure
 An amount of a specified unit, consisting of a number and a Unit. More...
 
class  MeasureFormat
 
class  MeasureUnit
 A unit such as length, mass, volume, currency, etc. More...
 
class  MessageFormat
 
class  MessagePattern
 Parses and represents ICU MessageFormat patterns. More...
 
class  Normalizer
 Old Unicode normalization API. More...
 
class  Normalizer2
 Unicode normalization functionality for standard Unicode normalization or for using custom mapping tables. More...
 
class  NumberFormat
 
class  NumberFormatFactory
 A NumberFormatFactory is used to register new number formats. More...
 
class  NumberingSystem
 Defines numbering systems. More...
 
class  ParagraphLayout
 ParagraphLayout. More...
 
class  ParsePosition
 ParsePosition is a simple class used by Format and its subclasses to keep track of the current position during parsing. More...
 
class  PluralFormat
 
class  PluralRules
 Defines rules for mapping non-negative numeric values onto a small set of keywords. More...
 
class  RegexMatcher
 class RegexMatcher bundles together a regular expression pattern and input text to which the expression can be applied. More...
 
class  RegexPattern
 Class RegexPattern represents a compiled regular expression. More...
 
class  Region
 Region is the class representing a Unicode Region Code, also known as a Unicode Region Subtag, which is defined based upon the BCP 47 standard. More...
 
class  RelativeDateTimeFormatter
 Formats simple relative dates. More...
 
class  Replaceable
 Replaceable is an abstract base class representing a string of characters that supports the replacement of a range of itself with a new string of characters. More...
 
class  ResourceBundle
 A class representing a collection of resource information pertaining to a given locale. More...
 
class  RuleBasedBreakIterator
 A subclass of BreakIterator whose behavior is specified using a list of rules. More...
 
class  RuleBasedCollator
 The RuleBasedCollator class provides the implementation of Collator, using data-driven tables. More...
 
class  RuleBasedNumberFormat
 The RuleBasedNumberFormat class formats numbers according to a set of rules. More...
 
class  RuleBasedTimeZone
 a BasicTimeZone subclass implemented in terms of InitialTimeZoneRule and TimeZoneRule instances More...
 
class  RunArray
 The RunArray class is a base class for building classes which represent data that is associated with runs of text. More...
 
class  ScientificNumberFormatter
 A formatter that formats numbers in user-friendly scientific notation. More...
 
class  SearchIterator
 SearchIterator is an abstract base class that provides methods to search for a pattern within a text string. More...
 
class  SelectFormat
 
class  SimpleDateFormat
 SimpleDateFormat is a concrete class for formatting and parsing dates in a language-independent manner. More...
 
class  SimpleFormatter
 Formats simple patterns like "{1} was born in {0}". More...
 
class  SimpleNumberFormatFactory
 A NumberFormatFactory that supports a single locale. More...
 
class  SimpleTimeZone
 SimpleTimeZone is a concrete subclass of TimeZone that represents a time zone for use with a Gregorian calendar. More...
 
class  StringByteSink
 Implementation of ByteSink that writes to a "string". More...
 
class  StringCharacterIterator
 A concrete subclass of CharacterIterator that iterates over the characters (code units or code points) in a UnicodeString. More...
 
class  StringEnumeration
 Base class for 'pure' C++ implementations of uenum api. More...
 
class  StringPiece
 A string-like object that points to a sized piece of memory. More...
 
class  StringSearch
 StringSearch is a SearchIterator that provides language-sensitive text searching based on the comparison rules defined in a RuleBasedCollator object. More...
 
class  SymbolTable
 An interface that defines both lookup protocol and parsing of symbolic names. More...
 
class  TimeArrayTimeZoneRule
 TimeArrayTimeZoneRule represents a time zone rule whose start times are defined by an array of milliseconds since the standard base time. More...
 
class  TimeUnit
 Measurement unit for time units. More...
 
class  TimeUnitAmount
 Express a duration as a time unit and number. More...
 
class  TimeUnitFormat
 Format or parse a TimeUnitAmount, using plural rules for the units where available. More...
 
class  TimeZone
 TimeZone represents a time zone offset, and also figures out daylight savings. More...
 
class  TimeZoneFormat
 TimeZoneFormat supports time zone display name formatting and parsing. More...
 
class  TimeZoneNames
 TimeZoneNames is an abstract class representing the time zone display name data model defined by UTS#35 Unicode Locale Data Markup Language (LDML). More...
 
class  TimeZoneRule
 TimeZoneRule is a class representing a rule for time zone. More...
 
class  TimeZoneTransition
 TimeZoneTransition is a class representing a time zone transition. More...
 
class  Transliterator
 Transliterator is an abstract class that transliterates text from one format to another. More...
 
class  UCharCharacterIterator
 A concrete subclass of CharacterIterator that iterates over the characters (code units or code points) in a char16_t array. More...
 
class  UCharsTrie
 Light-weight, non-const reader class for a UCharsTrie. More...
 
class  UCharsTrieBuilder
 Builder class for UCharsTrie. More...
 
class  UMemory
 UMemory is the common ICU base class. More...
 
class  UnicodeFilter
 UnicodeFilter defines a protocol for selecting a subset of the full range (U+0000 to U+10FFFF) of Unicode characters. More...
 
class  UnicodeFunctor
 UnicodeFunctor is an abstract base class for objects that perform match and/or replace operations on Unicode strings. More...
 
class  UnicodeMatcher
 UnicodeMatcher defines a protocol for objects that can match a range of characters in a Replaceable string. More...
 
class  UnicodeReplacer
 UnicodeReplacer defines a protocol for objects that replace a range of characters in a Replaceable string with output text. More...
 
class  UnicodeSet
 A mutable set of Unicode characters and multicharacter strings. More...
 
class  UnicodeSetIterator
 UnicodeSetIterator iterates over the contents of a UnicodeSet. More...
 
class  UnicodeString
 UnicodeString is a string class that stores Unicode characters directly and provides similar functionality as the Java String and StringBuffer/StringBuilder classes. More...
 
class  UnicodeStringAppendable
 An Appendable implementation which writes to a UnicodeString. More...
 
class  UObject
 UObject is the common ICU "boilerplate" class. More...
 
class  ValueRuns
 The ValueRuns class associates integer values with runs of text. More...
 
class  VTimeZone
 VTimeZone is a class implementing RFC2445 VTIMEZONE. More...
 

Typedefs

typedef RuleBasedBreakIterator DictionaryBasedBreakIterator
 An obsolete subclass of RuleBasedBreakIterator. More...
 
typedef int32_t UFieldResolutionTable[12][8]
 
typedef enum icu::UMeasurePrefix UMeasurePrefix
 Enumeration for SI and binary prefixes, e.g. More...
 

Enumerations

enum  UMatchDegree { U_MISMATCH , U_PARTIAL_MATCH , U_MATCH }
 Constants returned by UnicodeMatcher::matches() indicating the degree of match. More...
 
enum  UMeasureUnitComplexity { UMEASURE_UNIT_SINGLE , UMEASURE_UNIT_COMPOUND , UMEASURE_UNIT_MIXED }
 Enumeration for unit complexity. More...
 
enum  UMeasurePrefix {
  UMEASURE_PREFIX_ONE = 30 + 0 , UMEASURE_PREFIX_YOTTA = UMEASURE_PREFIX_ONE + 24 , UMEASURE_PREFIX_INTERNAL_MAX_SI = UMEASURE_PREFIX_YOTTA , UMEASURE_PREFIX_ZETTA = UMEASURE_PREFIX_ONE + 21 ,
  UMEASURE_PREFIX_EXA = UMEASURE_PREFIX_ONE + 18 , UMEASURE_PREFIX_PETA = UMEASURE_PREFIX_ONE + 15 , UMEASURE_PREFIX_TERA = UMEASURE_PREFIX_ONE + 12 , UMEASURE_PREFIX_GIGA = UMEASURE_PREFIX_ONE + 9 ,
  UMEASURE_PREFIX_MEGA = UMEASURE_PREFIX_ONE + 6 , UMEASURE_PREFIX_KILO = UMEASURE_PREFIX_ONE + 3 , UMEASURE_PREFIX_HECTO = UMEASURE_PREFIX_ONE + 2 , UMEASURE_PREFIX_DEKA = UMEASURE_PREFIX_ONE + 1 ,
  UMEASURE_PREFIX_DECI = UMEASURE_PREFIX_ONE + -1 , UMEASURE_PREFIX_CENTI = UMEASURE_PREFIX_ONE + -2 , UMEASURE_PREFIX_MILLI = UMEASURE_PREFIX_ONE + -3 , UMEASURE_PREFIX_MICRO = UMEASURE_PREFIX_ONE + -6 ,
  UMEASURE_PREFIX_NANO = UMEASURE_PREFIX_ONE + -9 , UMEASURE_PREFIX_PICO = UMEASURE_PREFIX_ONE + -12 , UMEASURE_PREFIX_FEMTO = UMEASURE_PREFIX_ONE + -15 , UMEASURE_PREFIX_ATTO = UMEASURE_PREFIX_ONE + -18 ,
  UMEASURE_PREFIX_ZEPTO = UMEASURE_PREFIX_ONE + -21 , UMEASURE_PREFIX_YOCTO = UMEASURE_PREFIX_ONE + -24 , UMEASURE_PREFIX_INTERNAL_MIN_SI = UMEASURE_PREFIX_YOCTO , UMEASURE_PREFIX_INTERNAL_ONE_BIN = -60 ,
  UMEASURE_PREFIX_KIBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 1 , UMEASURE_PREFIX_INTERNAL_MIN_BIN = UMEASURE_PREFIX_KIBI , UMEASURE_PREFIX_MEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 2 , UMEASURE_PREFIX_GIBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 3 ,
  UMEASURE_PREFIX_TEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 4 , UMEASURE_PREFIX_PEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 5 , UMEASURE_PREFIX_EXBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 6 , UMEASURE_PREFIX_ZEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 7 ,
  UMEASURE_PREFIX_YOBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 8 , UMEASURE_PREFIX_INTERNAL_MAX_BIN = UMEASURE_PREFIX_YOBI
}
 Enumeration for SI and binary prefixes, e.g. More...
 
enum  URBNFRuleSetTag {
  URBNF_SPELLOUT , URBNF_ORDINAL , URBNF_DURATION , URBNF_NUMBERING_SYSTEM ,
  URBNF_COUNT
}
 Tags for the predefined rulesets. More...
 

Functions

const UChartoUCharPtr (const char16_t *p)
 Converts from const char16_t * to const UChar *. More...
 
UChartoUCharPtr (char16_t *p)
 Converts from char16_t * to UChar *. More...
 
const OldUChartoOldUCharPtr (const char16_t *p)
 Converts from const char16_t * to const OldUChar *. More...
 
OldUChartoOldUCharPtr (char16_t *p)
 Converts from char16_t * to OldUChar *. More...
 
void locale_available_init ()
 
U_EXPORT UBool operator== (const StringPiece &x, const StringPiece &y)
 Global operator == for StringPiece. More...
 
bool operator!= (const StringPiece &x, const StringPiece &y)
 Global operator != for StringPiece. More...
 
U_COMMON_API UnicodeString operator+ (const UnicodeString &s1, const UnicodeString &s2)
 Create a new UnicodeString with the concatenation of two others. More...
 
UnicodeString ures_getUnicodeString (const UResourceBundle *resB, UErrorCode *status)
 Returns the string value from a string resource bundle. More...
 
UnicodeString ures_getNextUnicodeString (UResourceBundle *resB, const char **key, UErrorCode *status)
 Returns the next string in a resource, or an empty string if there are no more resources to iterate over. More...
 
UnicodeString ures_getUnicodeStringByIndex (const UResourceBundle *resB, int32_t indexS, UErrorCode *status)
 Returns the string in a given resource array or table at the specified index. More...
 
UnicodeString ures_getUnicodeStringByKey (const UResourceBundle *resB, const char *key, UErrorCode *status)
 Returns a string in a resource that has a given key. More...
 
void GenderInfo_initCache (UErrorCode &status)
 
U_CAPI int32_t umeas_getPrefixBase (UMeasurePrefix unitPrefix)
 Returns the base of the factor associated with the given unit prefix: the base is 10 for SI prefixes (kilo, micro) and 1024 for binary prefixes (kibi, mebi). More...
 
U_CAPI int32_t umeas_getPrefixPower (UMeasurePrefix unitPrefix)
 Returns the exponent of the factor associated with the given unit prefix, for example 3 for kilo, -6 for micro, 1 for kibi, 2 for mebi, 3 for gibi. More...
 
U_IO_API std::ostream & operator<< (std::ostream &stream, const UnicodeString &s)
 Write the contents of a UnicodeString to a C++ ostream. More...
 
U_IO_API std::istream & operator>> (std::istream &stream, UnicodeString &s)
 Write the contents from a C++ istream to a UnicodeString. More...
 

Variables

constexpr const size_t kInternalNumSysNameCapacity = 8
 Size of a numbering system name. More...
 

Detailed Description

File coll.h.

File tblcoll.h.

Created by: Helena Shih

Modification History:

Date Name Description 02/5/97 aliu Modified createDefault to load collation data from binary files when possible. Added related methods createCollationFromFile, chopLocale, createPathName. 02/11/97 aliu Added members addToCache, findInCache, and fgCache. 02/12/97 aliu Modified to create objects from RuleBasedCollator cache. Moved cache out of Collation class. 02/13/97 aliu Moved several methods out of this class and into RuleBasedCollator, with modifications. Modified createDefault() to call new RuleBasedCollator(Locale&) constructor. General clean up and documentation. 02/20/97 helena Added clone, operator==, operator!=, operator=, copy constructor and getDynamicClassID. 03/25/97 helena Updated with platform independent data types. 05/06/97 helena Added memory allocation error detection. 06/20/97 helena Java class name change. 09/03/97 helena Added createCollationKeyValues(). 02/10/98 damiba Added compare() with length as parameter. 04/23/99 stephen Removed EDecompositionMode, merged with Normalizer::EMode. 11/02/99 helena Collator performance enhancements. Eliminates the UnicodeString construction and special case for NO_OP. 11/23/99 srl More performance enhancements. Inlining of critical accessors. 05/15/00 helena Added version information API. 01/29/01 synwee Modified into a C++ wrapper which calls C apis (ucol.h). 2012-2014 markus Rewritten in C++ again.

Created by: Helena Shih

Modification History:

Date Name Description 2/5/97 aliu Added streamIn and streamOut methods. Added constructor which reads RuleBasedCollator object from a binary file. Added writeToFile method which streams RuleBasedCollator out to a binary file. The streamIn and streamOut methods use istream and ostream objects in binary mode. 2/12/97 aliu Modified to use TableCollationData sub-object to hold invariant data. 2/13/97 aliu Moved several methods into this class from Collation. Added a private RuleBasedCollator(Locale&) constructor, to be used by Collator::createDefault(). General clean up. 2/20/97 helena Added clone, operator==, operator!=, operator=, and copy constructor and getDynamicClassID. 3/5/97 aliu Modified constructFromFile() to add parameter specifying whether or not binary loading is to be attempted. This is required for dynamic rule loading. 05/07/97 helena Added memory allocation error detection. 6/17/97 helena Added IDENTICAL strength for compare, changed getRules to use MergeCollation::getPattern. 6/20/97 helena Java class name change. 8/18/97 helena Added internal API documentation. 09/03/97 helena Added createCollationKeyValues(). 02/10/98 damiba Added compare with "length" parameter 08/05/98 erm Synched with 1.2 version of RuleBasedCollator.java 04/23/99 stephen Removed EDecompositionMode, merged with Normalizer::EMode 06/14/99 stephen Removed kResourceBundleSuffix 11/02/99 helena Collator performance enhancements. Eliminates the UnicodeString construction and special case for NO_OP. 11/23/99 srl More performance enhancements. Updates to NormalizerIterator internal state management. 12/15/99 aliu Update to support Thai collation. Move NormalizerIterator to implementation file. 01/29/01 synwee Modified into a C++ wrapper which calls C API (ucol.h) 2012-2014 markus Rewritten in C++ again.

Typedef Documentation

◆ DictionaryBasedBreakIterator

An obsolete subclass of RuleBasedBreakIterator.

Handling of dictionary- based break iteration has been folded into the base class. This class is deprecated as of ICU 3.6.

Deprecated:
ICU 3.6

Definition at line 38 of file dbbi.h.

◆ UFieldResolutionTable

typedef int32_t icu::UFieldResolutionTable[12][8]
Internal:
Do not use. This API is for internal use only.

Definition at line 55 of file calendar.h.

◆ UMeasurePrefix

Enumeration for SI and binary prefixes, e.g.

"kilo-", "nano-", "mebi-".

Enum values should be treated as opaque: use umeas_getPrefixPower() and umeas_getPrefixBase() to find their corresponding values.

Stable:
ICU 69
See also
umeas_getPrefixBase
umeas_getPrefixPower

Enumeration Type Documentation

◆ UMatchDegree

Constants returned by UnicodeMatcher::matches() indicating the degree of match.

Stable:
ICU 2.4
Enumerator
U_MISMATCH 

Constant returned by matches() indicating a mismatch between the text and this matcher.

The text contains a character which does not match, or the text does not contain all desired characters for a non-incremental match.

Stable:
ICU 2.4
U_PARTIAL_MATCH 

Constant returned by matches() indicating a partial match between the text and this matcher.

This value is only returned for incremental match operations. All characters of the text match, but more characters are required for a complete match. Alternatively, for variable-length matchers, all characters of the text match, and if more characters were supplied at limit, they might also match.

Stable:
ICU 2.4
U_MATCH 

Constant returned by matches() indicating a complete match between the text and this matcher.

For an incremental variable-length match, this value is returned if the given text matches, and it is known that additional characters would not alter the extent of the match.

Stable:
ICU 2.4

Definition at line 33 of file unimatch.h.

◆ UMeasurePrefix

Enumeration for SI and binary prefixes, e.g.

"kilo-", "nano-", "mebi-".

Enum values should be treated as opaque: use umeas_getPrefixPower() and umeas_getPrefixBase() to find their corresponding values.

Stable:
ICU 69
See also
umeas_getPrefixBase
umeas_getPrefixPower
Enumerator
UMEASURE_PREFIX_ONE 

The absence of an SI or binary prefix.

The integer representation of this enum value is an arbitrary implementation detail and should not be relied upon: use umeas_getPrefixPower() to obtain meaningful values.

Stable:
ICU 69
UMEASURE_PREFIX_YOTTA 

SI prefix: yotta, 10^24.

Stable:
ICU 69
UMEASURE_PREFIX_INTERNAL_MAX_SI 

ICU use only.

Used to determine the set of base-10 SI prefixes.

Internal:
Do not use. This API is for internal use only.
UMEASURE_PREFIX_ZETTA 

SI prefix: zetta, 10^21.

Stable:
ICU 69
UMEASURE_PREFIX_EXA 

SI prefix: exa, 10^18.

Stable:
ICU 69
UMEASURE_PREFIX_PETA 

SI prefix: peta, 10^15.

Stable:
ICU 69
UMEASURE_PREFIX_TERA 

SI prefix: tera, 10^12.

Stable:
ICU 69
UMEASURE_PREFIX_GIGA 

SI prefix: giga, 10^9.

Stable:
ICU 69
UMEASURE_PREFIX_MEGA 

SI prefix: mega, 10^6.

Stable:
ICU 69
UMEASURE_PREFIX_KILO 

SI prefix: kilo, 10^3.

Stable:
ICU 69
UMEASURE_PREFIX_HECTO 

SI prefix: hecto, 10^2.

Stable:
ICU 69
UMEASURE_PREFIX_DEKA 

SI prefix: deka, 10^1.

Stable:
ICU 69
UMEASURE_PREFIX_DECI 

SI prefix: deci, 10^-1.

Stable:
ICU 69
UMEASURE_PREFIX_CENTI 

SI prefix: centi, 10^-2.

Stable:
ICU 69
UMEASURE_PREFIX_MILLI 

SI prefix: milli, 10^-3.

Stable:
ICU 69
UMEASURE_PREFIX_MICRO 

SI prefix: micro, 10^-6.

Stable:
ICU 69
UMEASURE_PREFIX_NANO 

SI prefix: nano, 10^-9.

Stable:
ICU 69
UMEASURE_PREFIX_PICO 

SI prefix: pico, 10^-12.

Stable:
ICU 69
UMEASURE_PREFIX_FEMTO 

SI prefix: femto, 10^-15.

Stable:
ICU 69
UMEASURE_PREFIX_ATTO 

SI prefix: atto, 10^-18.

Stable:
ICU 69
UMEASURE_PREFIX_ZEPTO 

SI prefix: zepto, 10^-21.

Stable:
ICU 69
UMEASURE_PREFIX_YOCTO 

SI prefix: yocto, 10^-24.

Stable:
ICU 69
UMEASURE_PREFIX_INTERNAL_MIN_SI 

ICU use only.

Used to determine the set of base-10 SI prefixes.

Internal:
Do not use. This API is for internal use only.
UMEASURE_PREFIX_INTERNAL_ONE_BIN 

ICU use only.

Sets the arbitrary offset of the base-1024 binary prefixes' enum values.

Internal:
Do not use. This API is for internal use only.
UMEASURE_PREFIX_KIBI 

Binary prefix: kibi, 1024^1.

Stable:
ICU 69
UMEASURE_PREFIX_INTERNAL_MIN_BIN 

ICU use only.

Used to determine the set of base-1024 binary prefixes.

Internal:
Do not use. This API is for internal use only.
UMEASURE_PREFIX_MEBI 

Binary prefix: mebi, 1024^2.

Stable:
ICU 69
UMEASURE_PREFIX_GIBI 

Binary prefix: gibi, 1024^3.

Stable:
ICU 69
UMEASURE_PREFIX_TEBI 

Binary prefix: tebi, 1024^4.

Stable:
ICU 69
UMEASURE_PREFIX_PEBI 

Binary prefix: pebi, 1024^5.

Stable:
ICU 69
UMEASURE_PREFIX_EXBI 

Binary prefix: exbi, 1024^6.

Stable:
ICU 69
UMEASURE_PREFIX_ZEBI 

Binary prefix: zebi, 1024^7.

Stable:
ICU 69
UMEASURE_PREFIX_YOBI 

Binary prefix: yobi, 1024^8.

Stable:
ICU 69
UMEASURE_PREFIX_INTERNAL_MAX_BIN 

ICU use only.

Used to determine the set of base-1024 binary prefixes.

Internal:
Do not use. This API is for internal use only.

Definition at line 90 of file measunit.h.

◆ UMeasureUnitComplexity

Enumeration for unit complexity.

There are three levels:

  • SINGLE: A single unit, optionally with a power and/or SI or binary prefix. Examples: hectare, square-kilometer, kilojoule, per-second, mebibyte.
  • COMPOUND: A unit composed of the product of multiple single units. Examples: meter-per-second, kilowatt-hour, kilogram-meter-per-square-second.
  • MIXED: A unit composed of the sum of multiple single units. Examples: foot+inch, hour+minute+second, degree+arcminute+arcsecond.

The complexity determines which operations are available. For example, you cannot set the power or prefix of a compound unit.

Stable:
ICU 67
Enumerator
UMEASURE_UNIT_SINGLE 

A single unit, like kilojoule.

Stable:
ICU 67
UMEASURE_UNIT_COMPOUND 

A compound unit, like meter-per-second.

Stable:
ICU 67
UMEASURE_UNIT_MIXED 

A mixed unit, like hour+minute.

Stable:
ICU 67

Definition at line 56 of file measunit.h.

◆ URBNFRuleSetTag

Tags for the predefined rulesets.

Stable:
ICU 2.2
Enumerator
URBNF_SPELLOUT 

Requests predefined ruleset for spelling out numeric values in words.

Stable:
ICU 2.2
URBNF_ORDINAL 

Requests predefined ruleset for the ordinal form of a number.

Stable:
ICU 2.2
URBNF_DURATION 

Requests predefined ruleset for formatting a value as a duration in hours, minutes, and seconds.

Stable:
ICU 2.2
URBNF_NUMBERING_SYSTEM 

Requests predefined ruleset for various non-place-value numbering systems.

WARNING: The same resource contains rule sets for a variety of different numbering systems. You need to call setDefaultRuleSet() on the formatter to choose the actual numbering system.

Stable:
ICU 2.2
URBNF_COUNT 

One more than the highest normal URBNFRuleSetTag value.

Deprecated:
ICU 58 The numeric value may change over time, see ICU ticket #12420.

Definition at line 56 of file rbnf.h.

Function Documentation

◆ GenderInfo_initCache()

void icu::GenderInfo_initCache ( UErrorCode status)
Internal:
Do not use. This API is for internal use only. Forward Declaration

◆ locale_available_init()

void icu::locale_available_init ( )
Internal:
Do not use. This API is for internal use only.

◆ operator!=()

bool icu::operator!= ( const StringPiece x,
const StringPiece y 
)
inline

Global operator != for StringPiece.

Parameters
xThe first StringPiece to compare.
yThe second StringPiece to compare.
Returns
true if the string data is not equal
Stable:
ICU 4.8

Definition at line 335 of file stringpiece.h.

◆ operator+()

U_COMMON_API UnicodeString icu::operator+ ( const UnicodeString s1,
const UnicodeString s2 
)

Create a new UnicodeString with the concatenation of two others.

Parameters
s1The first string to be copied to the new one.
s2The second string to be copied to the new one, after s1.
Returns
UnicodeString(s1).append(s2)
Stable:
ICU 2.8

◆ operator<<()

U_IO_API std::ostream & icu::operator<< ( std::ostream &  stream,
const UnicodeString s 
)

Write the contents of a UnicodeString to a C++ ostream.

This functions writes the characters in a UnicodeString to an ostream. The UChars in the UnicodeString are converted to the char based ostream with the default converter.

Stable:
3.0

◆ operator==()

U_EXPORT UBool icu::operator== ( const StringPiece x,
const StringPiece y 
)

◆ operator>>()

U_IO_API std::istream & icu::operator>> ( std::istream &  stream,
UnicodeString s 
)

Write the contents from a C++ istream to a UnicodeString.

The UChars in the UnicodeString are converted from the char based istream with the default converter.

Stable:
3.0

◆ toOldUCharPtr() [1/2]

OldUChar * icu::toOldUCharPtr ( char16_t *  p)
inline

Converts from char16_t * to OldUChar *.

Includes an aliasing barrier if available.

Parameters
ppointer
Returns
p as OldUChar *
Stable:
ICU 59

Definition at line 302 of file char16ptr.h.

References U_ALIASING_BARRIER.

◆ toOldUCharPtr() [2/2]

const OldUChar * icu::toOldUCharPtr ( const char16_t *  p)
inline

Converts from const char16_t * to const OldUChar *.

Includes an aliasing barrier if available.

Parameters
ppointer
Returns
p as const OldUChar *
Stable:
ICU 59

Definition at line 288 of file char16ptr.h.

References U_ALIASING_BARRIER.

◆ toUCharPtr() [1/2]

UChar * icu::toUCharPtr ( char16_t *  p)
inline

Converts from char16_t * to UChar *.

Includes an aliasing barrier if available.

Parameters
ppointer
Returns
p as UChar *
Stable:
ICU 59

Definition at line 274 of file char16ptr.h.

References U_ALIASING_BARRIER.

◆ toUCharPtr() [2/2]

const UChar * icu::toUCharPtr ( const char16_t *  p)
inline

Converts from const char16_t * to const UChar *.

Includes an aliasing barrier if available.

Parameters
ppointer
Returns
p as const UChar *
Stable:
ICU 59

Definition at line 260 of file char16ptr.h.

References U_ALIASING_BARRIER.

Referenced by icu::Normalizer::compare(), icu::UnicodeString::endsWith(), and icu::UnicodeString::startsWith().

◆ umeas_getPrefixBase()

U_CAPI int32_t icu::umeas_getPrefixBase ( UMeasurePrefix  unitPrefix)

Returns the base of the factor associated with the given unit prefix: the base is 10 for SI prefixes (kilo, micro) and 1024 for binary prefixes (kibi, mebi).

Stable:
ICU 69

◆ umeas_getPrefixPower()

U_CAPI int32_t icu::umeas_getPrefixPower ( UMeasurePrefix  unitPrefix)

Returns the exponent of the factor associated with the given unit prefix, for example 3 for kilo, -6 for micro, 1 for kibi, 2 for mebi, 3 for gibi.

Stable:
ICU 69

◆ ures_getNextUnicodeString()

UnicodeString icu::ures_getNextUnicodeString ( UResourceBundle resB,
const char **  key,
UErrorCode status 
)
inline

Returns the next string in a resource, or an empty string if there are no more resources to iterate over.

Use ures_getNextString() instead to distinguish between the end of the iteration and a real empty string value.

Parameters
resBa resource
keyfill in for key associated with this string
statusfills in the outgoing error code
Returns
The string value, or a bogus string if there is a failure UErrorCode.
Stable:
ICU 2.0

Definition at line 837 of file ures.h.

References icu::UnicodeString::setTo(), icu::UnicodeString::setToBogus(), U_SUCCESS, and ures_getNextString().

◆ ures_getUnicodeString()

UnicodeString icu::ures_getUnicodeString ( const UResourceBundle resB,
UErrorCode status 
)
inline

Returns the string value from a string resource bundle.

Parameters
resBa resource, should have type URES_STRING
statusfills in the outgoing error code could be U_MISSING_RESOURCE_ERROR if the key is not found could be a non-failing error e.g.: U_USING_FALLBACK_WARNING,U_USING_DEFAULT_WARNING
Returns
The string value, or a bogus string if there is a failure UErrorCode.
Stable:
ICU 2.0

Definition at line 812 of file ures.h.

References icu::UnicodeString::setTo(), icu::UnicodeString::setToBogus(), U_SUCCESS, and ures_getString().

◆ ures_getUnicodeStringByIndex()

UnicodeString icu::ures_getUnicodeStringByIndex ( const UResourceBundle resB,
int32_t  indexS,
UErrorCode status 
)
inline

Returns the string in a given resource array or table at the specified index.

Parameters
resBa resource
indexSan index to the wanted string.
statusfills in the outgoing error code
Returns
The string value, or a bogus string if there is a failure UErrorCode.
Stable:
ICU 2.0

Definition at line 859 of file ures.h.

References icu::UnicodeString::setTo(), icu::UnicodeString::setToBogus(), U_SUCCESS, and ures_getStringByIndex().

◆ ures_getUnicodeStringByKey()

UnicodeString icu::ures_getUnicodeStringByKey ( const UResourceBundle resB,
const char *  key,
UErrorCode status 
)
inline

Returns a string in a resource that has a given key.

This procedure works only with table resources.

Parameters
resBa resource
keya key associated with the wanted string
statusfills in the outgoing error code
Returns
The string value, or a bogus string if there is a failure UErrorCode.
Stable:
ICU 2.0

Definition at line 882 of file ures.h.

References icu::UnicodeString::setTo(), icu::UnicodeString::setToBogus(), U_SUCCESS, and ures_getStringByKey().

Variable Documentation

◆ kInternalNumSysNameCapacity

constexpr const size_t icu::kInternalNumSysNameCapacity = 8
constexpr

Size of a numbering system name.

Internal:
Do not use. This API is for internal use only.

Definition at line 42 of file numsys.h.