|
ICU 73.2
73.2
|
This class allows one to iterate through all the strings that are canonically equivalent to a given string. More...
#include <caniter.h>
Data Structures | |
| struct | final |
| Access to the list of edits. More... | |
Public Types | |
| enum | { MIN_VALUE = 0, MAX_VALUE = 0x10ffff } |
| enum | ESerialization { kSerialized } |
| enum | { NULLORDER = (int32_t)0xffffffff } |
| enum | DtContextType { FORMAT, STANDALONE, DT_CONTEXT_COUNT } |
| Selector for date formatting context. More... | |
| enum | DtWidthType { ABBREVIATED, WIDE, NARROW, SHORT, DT_WIDTH_COUNT = 4 } |
| Selector for date formatting width. More... | |
| enum | EMonthPatternType { kLeapMonthPatternFormatWide, kLeapMonthPatternFormatAbbrev, kLeapMonthPatternFormatNarrow, kLeapMonthPatternStandaloneWide, kLeapMonthPatternStandaloneAbbrev, kLeapMonthPatternStandaloneNarrow, kLeapMonthPatternNumeric, kMonthPatternsCount } |
| Somewhat temporary constants for leap month pattern types, adequate for supporting just leap month patterns as needed for Chinese lunar calendar. More... | |
| enum | ECapitalizationContextUsageType { kCapContextUsageOther = 0, kCapContextUsageMonthFormat, kCapContextUsageMonthStandalone, kCapContextUsageMonthNarrow, kCapContextUsageDayFormat, kCapContextUsageDayStandalone, kCapContextUsageDayNarrow, kCapContextUsageEraWide, kCapContextUsageEraAbbrev, kCapContextUsageEraNarrow, kCapContextUsageZoneLong, kCapContextUsageZoneShort, kCapContextUsageMetazoneLong, kCapContextUsageMetazoneShort, kCapContextUsageTypeCount = 14 } |
| Constants for capitalization context usage types. More... | |
| enum | { kMaxIntervalPatternIndex = kIPI_MAX_INDEX } |
| Max index for stored interval patterns. More... | |
Public Member Functions | |
| CanonicalIterator (const UnicodeString &source, UErrorCode &status) | |
| Construct a CanonicalIterator object. | |
| virtual | ~CanonicalIterator () |
| Destructor Cleans pieces. | |
| UnicodeString | getSource () |
| Gets the NFD form of the current source we are iterating over. | |
| void | reset () |
| Resets the iterator so that one can start again from the beginning. | |
| UnicodeString | next () |
| Get the next canonically equivalent string. | |
| void | setSource (const UnicodeString &newSource, UErrorCode &status) |
| Set a new source for this iterator. | |
| virtual UClassID | getDynamicClassID () const override |
| ICU "poor man's RTTI", returns a UClassID for the actual class. | |
| Char16Ptr (char16_t *p) | |
| Copies the pointer. | |
| Char16Ptr (uint16_t *p) | |
| Converts the pointer to char16_t *. | |
| Char16Ptr (wchar_t *p) | |
| Converts the pointer to char16_t *. | |
| Char16Ptr (std::nullptr_t p) | |
| nullptr constructor. | |
| ~Char16Ptr () | |
| Destructor. | |
| char16_t * | get () const |
| Pointer access. | |
| operator char16_t * () const | |
| char16_t pointer access via type conversion (e.g., static_cast). | |
| ConstChar16Ptr (const char16_t *p) | |
| Copies the pointer. | |
| ConstChar16Ptr (const uint16_t *p) | |
| Converts the pointer to char16_t *. | |
| ConstChar16Ptr (const wchar_t *p) | |
| Converts the pointer to char16_t *. | |
| ConstChar16Ptr (const std::nullptr_t p) | |
| nullptr constructor. | |
| ~ConstChar16Ptr () | |
| Destructor. | |
| const char16_t * | get () const |
| Pointer access. | |
| operator const char16_t * () const | |
| char16_t pointer access via type conversion (e.g., static_cast). | |
| Edits () | |
| Constructs an empty object. | |
| Edits (const Edits &other) | |
| Copy constructor. | |
| Edits (Edits &&src) noexcept | |
| Move constructor, might leave src empty. | |
| ~Edits () | |
| Destructor. | |
| Edits & | operator= (const Edits &other) |
| Assignment operator. | |
| Edits & | operator= (Edits &&src) noexcept |
| Move assignment operator, might leave src empty. | |
| void | reset () noexcept |
| Resets the data but may not release memory. | |
| void | addUnchanged (int32_t unchangedLength) |
| Adds a no-change edit: a record for an unchanged segment of text. | |
| void | addReplace (int32_t oldLength, int32_t newLength) |
| Adds a change edit: a record for a text replacement/insertion/deletion. | |
| UBool | copyErrorTo (UErrorCode &outErrorCode) const |
| Sets the UErrorCode if an error occurred while recording edits. | |
| int32_t | lengthDelta () const |
| How much longer is the new text compared with the old text? | |
| UBool | hasChanges () const |
| int32_t | numberOfChanges () const |
| Iterator | getCoarseChangesIterator () const |
| Returns an Iterator for coarse-grained change edits (adjacent change edits are treated as one). | |
| Iterator | getCoarseIterator () const |
| Returns an Iterator for coarse-grained change and no-change edits (adjacent change edits are treated as one). | |
| Iterator | getFineChangesIterator () const |
| Returns an Iterator for fine-grained change edits (full granularity of change edits is retained). | |
| Iterator | getFineIterator () const |
| Returns an Iterator for fine-grained change and no-change edits (full granularity of change edits is retained). | |
| Edits & | mergeAndAppend (const Edits &ab, const Edits &bc, UErrorCode &errorCode) |
| Merges the two input Edits and appends the result to this object. | |
| SimpleFormatter () | |
| Default constructor. | |
| SimpleFormatter (const UnicodeString &pattern, UErrorCode &errorCode) | |
| Constructs a formatter from the pattern string. | |
| SimpleFormatter (const UnicodeString &pattern, int32_t min, int32_t max, UErrorCode &errorCode) | |
| Constructs a formatter from the pattern string. | |
| SimpleFormatter (const SimpleFormatter &other) | |
| Copy constructor. | |
| SimpleFormatter & | operator= (const SimpleFormatter &other) |
| Assignment operator. | |
| ~SimpleFormatter () | |
| Destructor. | |
| UBool | applyPattern (const UnicodeString &pattern, UErrorCode &errorCode) |
| Changes this object according to the new pattern. | |
| UBool | applyPatternMinMaxArguments (const UnicodeString &pattern, int32_t min, int32_t max, UErrorCode &errorCode) |
| Changes this object according to the new pattern. | |
| int32_t | getArgumentLimit () const |
| UnicodeString & | format (const UnicodeString &value0, UnicodeString &appendTo, UErrorCode &errorCode) const |
| Formats the given value, appending to the appendTo builder. | |
| UnicodeString & | format (const UnicodeString &value0, const UnicodeString &value1, UnicodeString &appendTo, UErrorCode &errorCode) const |
| Formats the given values, appending to the appendTo builder. | |
| UnicodeString & | format (const UnicodeString &value0, const UnicodeString &value1, const UnicodeString &value2, UnicodeString &appendTo, UErrorCode &errorCode) const |
| Formats the given values, appending to the appendTo builder. | |
| UnicodeString & | formatAndAppend (const UnicodeString *const *values, int32_t valuesLength, UnicodeString &appendTo, int32_t *offsets, int32_t offsetsLength, UErrorCode &errorCode) const |
| Formats the given values, appending to the appendTo string. | |
| UnicodeString & | formatAndReplace (const UnicodeString *const *values, int32_t valuesLength, UnicodeString &result, int32_t *offsets, int32_t offsetsLength, UErrorCode &errorCode) const |
| Formats the given values, replacing the contents of the result string. | |
| UnicodeString | getTextWithNoArguments () const |
| Returns the pattern text with none of the arguments. | |
| UnicodeString | getTextWithNoArguments (int32_t *offsets, int32_t offsetsLength) const |
| Returns the pattern text with none of the arguments. | |
| UBool | isBogus (void) const |
| Determine if this object contains a valid set. | |
| void | setToBogus () |
| Make this UnicodeSet object invalid. | |
| UnicodeSet () | |
| Constructs an empty set. | |
| UnicodeSet (UChar32 start, UChar32 end) | |
| Constructs a set containing the given range. | |
| UnicodeSet (const uint16_t buffer[], int32_t bufferLen, ESerialization serialization, UErrorCode &status) | |
| Constructs a set from the output of serialize(). | |
| UnicodeSet (const UnicodeString &pattern, UErrorCode &status) | |
| Constructs a set from the given pattern. | |
| UnicodeSet (const UnicodeString &pattern, uint32_t options, const SymbolTable *symbols, UErrorCode &status) | |
| Constructs a set from the given pattern. | |
| UnicodeSet (const UnicodeString &pattern, ParsePosition &pos, uint32_t options, const SymbolTable *symbols, UErrorCode &status) | |
| Constructs a set from the given pattern. | |
| UnicodeSet (const UnicodeSet &o) | |
| Constructs a set that is identical to the given UnicodeSet. | |
| virtual | ~UnicodeSet () |
| Destructs the set. | |
| UnicodeSet & | operator= (const UnicodeSet &o) |
| Assigns this object to be a copy of another. | |
| virtual bool | operator== (const UnicodeSet &o) const |
| Compares the specified object with this set for equality. | |
| bool | operator!= (const UnicodeSet &o) const |
| Compares the specified object with this set for equality. | |
| virtual UnicodeSet * | clone () const override |
| Returns a copy of this object. | |
| virtual int32_t | hashCode (void) const |
| Returns the hash code value for this set. | |
| USet * | toUSet () |
| Produce a USet * pointer for this UnicodeSet. | |
| const USet * | toUSet () const |
| Produce a const USet * pointer for this UnicodeSet. | |
| UBool | isFrozen () const |
| Determines whether the set has been frozen (made immutable) or not. | |
| UnicodeSet * | freeze () |
| Freeze the set (make it immutable). | |
| UnicodeSet * | cloneAsThawed () const |
| Clone the set and make the clone mutable. | |
| UnicodeSet & | set (UChar32 start, UChar32 end) |
| Make this object represent the range `start - end`. | |
| UnicodeSet & | applyPattern (const UnicodeString &pattern, UErrorCode &status) |
| Modifies this set to represent the set specified by the given pattern, ignoring Unicode Pattern_White_Space characters. | |
| UnicodeSet & | applyPattern (const UnicodeString &pattern, uint32_t options, const SymbolTable *symbols, UErrorCode &status) |
| Modifies this set to represent the set specified by the given pattern, optionally ignoring Unicode Pattern_White_Space characters. | |
| UnicodeSet & | applyPattern (const UnicodeString &pattern, ParsePosition &pos, uint32_t options, const SymbolTable *symbols, UErrorCode &status) |
| Parses the given pattern, starting at the given position. | |
| virtual UnicodeString & | toPattern (UnicodeString &result, UBool escapeUnprintable=false) const override |
| Returns a string representation of this set. | |
| UnicodeSet & | applyIntPropertyValue (UProperty prop, int32_t value, UErrorCode &ec) |
| Modifies this set to contain those code points which have the given value for the given binary or enumerated property, as returned by u_getIntPropertyValue. | |
| UnicodeSet & | applyPropertyAlias (const UnicodeString &prop, const UnicodeString &value, UErrorCode &ec) |
| Modifies this set to contain those code points which have the given value for the given property. | |
| virtual int32_t | size (void) const |
| Returns the number of elements in this set (its cardinality). | |
| virtual UBool | isEmpty (void) const |
Returns true if this set contains no elements. | |
| UBool | hasStrings () const |
| virtual UBool | contains (UChar32 c) const override |
| Returns true if this set contains the given character. | |
| virtual UBool | contains (UChar32 start, UChar32 end) const |
| Returns true if this set contains every character of the given range. | |
| UBool | contains (const UnicodeString &s) const |
Returns true if this set contains the given multicharacter string. | |
| virtual UBool | containsAll (const UnicodeSet &c) const |
| Returns true if this set contains all the characters and strings of the given set. | |
| UBool | containsAll (const UnicodeString &s) const |
| Returns true if this set contains all the characters of the given string. | |
| UBool | containsNone (UChar32 start, UChar32 end) const |
| Returns true if this set contains none of the characters of the given range. | |
| UBool | containsNone (const UnicodeSet &c) const |
| Returns true if this set contains none of the characters and strings of the given set. | |
| UBool | containsNone (const UnicodeString &s) const |
| Returns true if this set contains none of the characters of the given string. | |
| UBool | containsSome (UChar32 start, UChar32 end) const |
| Returns true if this set contains one or more of the characters in the given range. | |
| UBool | containsSome (const UnicodeSet &s) const |
| Returns true if this set contains one or more of the characters and strings of the given set. | |
| UBool | containsSome (const UnicodeString &s) const |
| Returns true if this set contains one or more of the characters of the given string. | |
| int32_t | span (const char16_t *s, int32_t length, USetSpanCondition spanCondition) const |
| Returns the length of the initial substring of the input string which consists only of characters and strings that are contained in this set (USET_SPAN_CONTAINED, USET_SPAN_SIMPLE), or only of characters and strings that are not contained in this set (USET_SPAN_NOT_CONTAINED). | |
| int32_t | span (const UnicodeString &s, int32_t start, USetSpanCondition spanCondition) const |
| Returns the end of the substring of the input string according to the USetSpanCondition. | |
| int32_t | spanBack (const char16_t *s, int32_t length, USetSpanCondition spanCondition) const |
| Returns the start of the trailing substring of the input string which consists only of characters and strings that are contained in this set (USET_SPAN_CONTAINED, USET_SPAN_SIMPLE), or only of characters and strings that are not contained in this set (USET_SPAN_NOT_CONTAINED). | |
| int32_t | spanBack (const UnicodeString &s, int32_t limit, USetSpanCondition spanCondition) const |
| Returns the start of the substring of the input string according to the USetSpanCondition. | |
| int32_t | spanUTF8 (const char *s, int32_t length, USetSpanCondition spanCondition) const |
| Returns the length of the initial substring of the input string which consists only of characters and strings that are contained in this set (USET_SPAN_CONTAINED, USET_SPAN_SIMPLE), or only of characters and strings that are not contained in this set (USET_SPAN_NOT_CONTAINED). | |
| int32_t | spanBackUTF8 (const char *s, int32_t length, USetSpanCondition spanCondition) const |
| Returns the start of the trailing substring of the input string which consists only of characters and strings that are contained in this set (USET_SPAN_CONTAINED, USET_SPAN_SIMPLE), or only of characters and strings that are not contained in this set (USET_SPAN_NOT_CONTAINED). | |
| virtual UMatchDegree | matches (const Replaceable &text, int32_t &offset, int32_t limit, UBool incremental) override |
| Implement UnicodeMatcher::matches() | |
| virtual void | addMatchSetTo (UnicodeSet &toUnionTo) const override |
| Implementation of UnicodeMatcher API. | |
| int32_t | indexOf (UChar32 c) const |
| Returns the index of the given character within this set, where the set is ordered by ascending code point. | |
| UChar32 | charAt (int32_t index) const |
| Returns the character at the given index within this set, where the set is ordered by ascending code point. | |
| virtual UnicodeSet & | add (UChar32 start, UChar32 end) |
| Adds the specified range to this set if it is not already present. | |
| UnicodeSet & | add (UChar32 c) |
| Adds the specified character to this set if it is not already present. | |
| UnicodeSet & | add (const UnicodeString &s) |
| Adds the specified multicharacter to this set if it is not already present. | |
| UnicodeSet & | addAll (const UnicodeString &s) |
| Adds each of the characters in this string to the set. | |
| UnicodeSet & | retainAll (const UnicodeString &s) |
| Retains EACH of the characters in this string. | |
| UnicodeSet & | complementAll (const UnicodeString &s) |
| Complement EACH of the characters in this string. | |
| UnicodeSet & | removeAll (const UnicodeString &s) |
| Remove EACH of the characters in this string. | |
| virtual UnicodeSet & | retain (UChar32 start, UChar32 end) |
| Retain only the elements in this set that are contained in the specified range. | |
| UnicodeSet & | retain (UChar32 c) |
| Retain the specified character from this set if it is present. | |
| UnicodeSet & | retain (const UnicodeString &s) |
| Retains only the specified string from this set if it is present. | |
| virtual UnicodeSet & | remove (UChar32 start, UChar32 end) |
| Removes the specified range from this set if it is present. | |
| UnicodeSet & | remove (UChar32 c) |
| Removes the specified character from this set if it is present. | |
| UnicodeSet & | remove (const UnicodeString &s) |
| Removes the specified string from this set if it is present. | |
| virtual UnicodeSet & | complement () |
This is equivalent to complement(MIN_VALUE, MAX_VALUE). | |
| virtual UnicodeSet & | complement (UChar32 start, UChar32 end) |
| Complements the specified range in this set. | |
| UnicodeSet & | complement (UChar32 c) |
| Complements the specified character in this set. | |
| UnicodeSet & | complement (const UnicodeString &s) |
| Complement the specified string in this set. | |
| virtual UnicodeSet & | addAll (const UnicodeSet &c) |
| Adds all of the elements in the specified set to this set if they're not already present. | |
| virtual UnicodeSet & | retainAll (const UnicodeSet &c) |
| Retains only the elements in this set that are contained in the specified set. | |
| virtual UnicodeSet & | removeAll (const UnicodeSet &c) |
| Removes from this set all of its elements that are contained in the specified set. | |
| virtual UnicodeSet & | complementAll (const UnicodeSet &c) |
| Complements in this set all elements contained in the specified set. | |
| virtual UnicodeSet & | clear (void) |
| Removes all of the elements from this set. | |
| UnicodeSet & | closeOver (int32_t attribute) |
| Close this set over the given attribute. | |
| virtual UnicodeSet & | removeAllStrings () |
| Remove all strings from this set. | |
| virtual int32_t | getRangeCount (void) const |
| Iteration method that returns the number of ranges contained in this set. | |
| virtual UChar32 | getRangeStart (int32_t index) const |
| Iteration method that returns the first character in the specified range of this set. | |
| virtual UChar32 | getRangeEnd (int32_t index) const |
| Iteration method that returns the last character in the specified range of this set. | |
| int32_t | serialize (uint16_t *dest, int32_t destCapacity, UErrorCode &ec) const |
| Serializes this set into an array of 16-bit integers. | |
| virtual UnicodeSet & | compact () |
| Reallocate this objects internal structures to take up the least possible space, without changing this object's value. | |
| virtual UClassID | getDynamicClassID (void) const override |
| Implement UnicodeFunctor API. | |
| UnicodeSetIterator (const UnicodeSet &set) | |
| Create an iterator over the given set. | |
| UnicodeSetIterator () | |
| Create an iterator over nothing. | |
| virtual | ~UnicodeSetIterator () |
| Destructor. | |
| UBool | isString () const |
| Returns true if the current element is a string. | |
| UChar32 | getCodepoint () const |
Returns the current code point, if isString() returned false. | |
| UChar32 | getCodepointEnd () const |
Returns the end of the current code point range, if isString() returned false and nextRange() was called. | |
| const UnicodeString & | getString () |
Returns the current string, if isString() returned true. | |
| UnicodeSetIterator & | skipToStrings () |
| Skips over the remaining code points/ranges, if any. | |
| UBool | next () |
| Advances the iteration position to the next element in the set, which can be either a single code point or a string. | |
| UBool | nextRange () |
| Returns the next element in the set, either a code point range or a string. | |
| void | reset (const UnicodeSet &set) |
| Sets this iterator to visit the elements of the given set and resets it to the start of that set. | |
| void | reset () |
| Resets this iterator to the start of the set. | |
| virtual UClassID | getDynamicClassID () const override |
| ICU "poor man's RTTI", returns a UClassID for the actual class. | |
| CollationElementIterator (const CollationElementIterator &other) | |
| Copy constructor. | |
| virtual | ~CollationElementIterator () |
| Destructor. | |
| bool | operator== (const CollationElementIterator &other) const |
| Returns true if "other" is the same as "this". | |
| bool | operator!= (const CollationElementIterator &other) const |
| Returns true if "other" is not the same as "this". | |
| void | reset (void) |
| Resets the cursor to the beginning of the string. | |
| int32_t | next (UErrorCode &status) |
| Gets the ordering priority of the next character in the string. | |
| int32_t | previous (UErrorCode &status) |
| Get the ordering priority of the previous collation element in the string. | |
| int32_t | getMaxExpansion (int32_t order) const |
| Return the maximum length of any expansion sequences that end with the specified comparison order. | |
| int32_t | strengthOrder (int32_t order) const |
| Gets the comparison order in the desired strength. | |
| void | setText (const UnicodeString &str, UErrorCode &status) |
| Sets the source string. | |
| void | setText (CharacterIterator &str, UErrorCode &status) |
| Sets the source string. | |
| int32_t | getOffset (void) const |
| Gets the offset of the currently processed character in the source string. | |
| void | setOffset (int32_t newOffset, UErrorCode &status) |
| Sets the offset of the currently processed character in the source string. | |
| virtual UClassID | getDynamicClassID () const override |
| ICU "poor man's RTTI", returns a UClassID for the actual class. | |
| UCollationElements * | toUCollationElements () |
| const UCollationElements * | toUCollationElements () const |
| DateFormatSymbols (UErrorCode &status) | |
| Construct a DateFormatSymbols object by loading format data from resources for the default locale, in the default calendar (Gregorian). | |
| DateFormatSymbols (const Locale &locale, UErrorCode &status) | |
| Construct a DateFormatSymbols object by loading format data from resources for the given locale, in the default calendar (Gregorian). | |
| DateFormatSymbols (const char *type, UErrorCode &status) | |
| Construct a DateFormatSymbols object by loading format data from resources for the default locale, in the default calendar (Gregorian). | |
| DateFormatSymbols (const Locale &locale, const char *type, UErrorCode &status) | |
| Construct a DateFormatSymbols object by loading format data from resources for the given locale, in the default calendar (Gregorian). | |
| DateFormatSymbols (const DateFormatSymbols &) | |
| Copy constructor. | |
| DateFormatSymbols & | operator= (const DateFormatSymbols &) |
| Assignment operator. | |
| virtual | ~DateFormatSymbols () |
| Destructor. | |
| bool | operator== (const DateFormatSymbols &other) const |
| Return true if another object is semantically equal to this one. | |
| bool | operator!= (const DateFormatSymbols &other) const |
| Return true if another object is semantically unequal to this one. | |
| const UnicodeString * | getEras (int32_t &count) const |
| Gets abbreviated era strings. | |
| void | setEras (const UnicodeString *eras, int32_t count) |
| Sets abbreviated era strings. | |
| const UnicodeString * | getEraNames (int32_t &count) const |
| Gets era name strings. | |
| void | setEraNames (const UnicodeString *eraNames, int32_t count) |
| Sets era name strings. | |
| const UnicodeString * | getNarrowEras (int32_t &count) const |
| Gets narrow era strings. | |
| void | setNarrowEras (const UnicodeString *narrowEras, int32_t count) |
| Sets narrow era strings. | |
| const UnicodeString * | getMonths (int32_t &count) const |
| Gets month strings. | |
| void | setMonths (const UnicodeString *months, int32_t count) |
| Sets month strings. | |
| const UnicodeString * | getShortMonths (int32_t &count) const |
| Gets short month strings. | |
| void | setShortMonths (const UnicodeString *shortMonths, int32_t count) |
| Sets short month strings. | |
| const UnicodeString * | getMonths (int32_t &count, DtContextType context, DtWidthType width) const |
| Gets month strings by width and context. | |
| void | setMonths (const UnicodeString *months, int32_t count, DtContextType context, DtWidthType width) |
| Sets month strings by width and context. | |
| const UnicodeString * | getWeekdays (int32_t &count) const |
| Gets wide weekday strings. | |
| void | setWeekdays (const UnicodeString *weekdays, int32_t count) |
| Sets wide weekday strings. | |
| const UnicodeString * | getShortWeekdays (int32_t &count) const |
| Gets abbreviated weekday strings. | |
| void | setShortWeekdays (const UnicodeString *abbrevWeekdays, int32_t count) |
| Sets abbreviated weekday strings. | |
| const UnicodeString * | getWeekdays (int32_t &count, DtContextType context, DtWidthType width) const |
| Gets weekday strings by width and context. | |
| void | setWeekdays (const UnicodeString *weekdays, int32_t count, DtContextType context, DtWidthType width) |
| Sets weekday strings by width and context. | |
| const UnicodeString * | getQuarters (int32_t &count, DtContextType context, DtWidthType width) const |
| Gets quarter strings by width and context. | |
| void | setQuarters (const UnicodeString *quarters, int32_t count, DtContextType context, DtWidthType width) |
| Sets quarter strings by width and context. | |
| const UnicodeString * | getAmPmStrings (int32_t &count) const |
| Gets AM/PM strings. | |
| void | setAmPmStrings (const UnicodeString *ampms, int32_t count) |
| Sets ampm strings. | |
| UnicodeString & | getTimeSeparatorString (UnicodeString &result) const |
| Gets the time separator string. | |
| void | setTimeSeparatorString (const UnicodeString &newTimeSeparator) |
| Sets the time separator string. | |
| const UnicodeString * | getYearNames (int32_t &count, DtContextType context, DtWidthType width) const |
| Gets cyclic year name strings if the calendar has them, by width and context. | |
| void | setYearNames (const UnicodeString *yearNames, int32_t count, DtContextType context, DtWidthType width) |
| Sets cyclic year name strings by width and context. | |
| const UnicodeString * | getZodiacNames (int32_t &count, DtContextType context, DtWidthType width) const |
| Gets calendar zodiac name strings if the calendar has them, by width and context. | |
| void | setZodiacNames (const UnicodeString *zodiacNames, int32_t count, DtContextType context, DtWidthType width) |
| Sets calendar zodiac name strings by width and context. | |
| const UnicodeString * | getLeapMonthPatterns (int32_t &count) const |
| Somewhat temporary function for getting complete set of leap month patterns for all contexts & widths, indexed by EMonthPatternType values. | |
| const UnicodeString ** | getZoneStrings (int32_t &rowCount, int32_t &columnCount) const |
| Gets timezone strings. | |
| void | setZoneStrings (const UnicodeString *const *strings, int32_t rowCount, int32_t columnCount) |
| Sets timezone strings. | |
| UnicodeString & | getLocalPatternChars (UnicodeString &result) const |
| Gets localized date-time pattern characters. | |
| void | setLocalPatternChars (const UnicodeString &newLocalPatternChars) |
| Sets localized date-time pattern characters. | |
| Locale | getLocale (ULocDataLocaleType type, UErrorCode &status) const |
| Returns the locale for this object. | |
| virtual UClassID | getDynamicClassID () const override |
| ICU "poor man's RTTI", returns a UClassID for the actual class. | |
| DateIntervalInfo (UErrorCode &status) | |
| Default constructor. | |
| DateIntervalInfo (const Locale &locale, UErrorCode &status) | |
| Construct DateIntervalInfo for the given locale,. | |
| DateIntervalInfo (const DateIntervalInfo &) | |
| Copy constructor. | |
| DateIntervalInfo & | operator= (const DateIntervalInfo &) |
| Assignment operator. | |
| virtual DateIntervalInfo * | clone () const |
| Clone this object polymorphically. | |
| virtual | ~DateIntervalInfo () |
| Destructor. | |
| virtual bool | operator== (const DateIntervalInfo &other) const |
| Return true if another object is semantically equal to this one. | |
| bool | operator!= (const DateIntervalInfo &other) const |
| Return true if another object is semantically unequal to this one. | |
| void | setIntervalPattern (const UnicodeString &skeleton, UCalendarDateFields lrgDiffCalUnit, const UnicodeString &intervalPattern, UErrorCode &status) |
| Provides a way for client to build interval patterns. | |
| UnicodeString & | getIntervalPattern (const UnicodeString &skeleton, UCalendarDateFields field, UnicodeString &result, UErrorCode &status) const |
| Get the interval pattern given skeleton and the largest different calendar field. | |
| UnicodeString & | getFallbackIntervalPattern (UnicodeString &result) const |
| Get the fallback interval pattern. | |
| void | setFallbackIntervalPattern (const UnicodeString &fallbackPattern, UErrorCode &status) |
| Re-set the fallback interval pattern. | |
| UBool | getDefaultOrder () const |
| Get default order -- whether the first date in pattern is later date or not. | |
| virtual UClassID | getDynamicClassID () const override |
| ICU "poor man's RTTI", returns a UClassID for the actual class. | |
| RegexPattern () | |
| default constructor. | |
| RegexPattern (const RegexPattern &source) | |
| Copy Constructor. | |
| virtual | ~RegexPattern () |
| Destructor. | |
| bool | operator== (const RegexPattern &that) const |
| Comparison operator. | |
| bool | operator!= (const RegexPattern &that) const |
| Comparison operator. | |
| RegexPattern & | operator= (const RegexPattern &source) |
| Assignment operator. | |
| virtual RegexPattern * | clone () const |
| Create an exact copy of this RegexPattern object. | |
| virtual uint32_t | flags () const |
| Get the URegexpFlag match mode flags that were used when compiling this pattern. | |
| virtual RegexMatcher * | matcher (const UnicodeString &input, UErrorCode &status) const |
| Creates a RegexMatcher that will match the given input against this pattern. | |
| virtual RegexMatcher * | matcher (UErrorCode &status) const |
| Creates a RegexMatcher that will match against this pattern. | |
| virtual UnicodeString | pattern () const |
| Returns the regular expression from which this pattern was compiled. | |
| virtual UText * | patternText (UErrorCode &status) const |
| Returns the regular expression from which this pattern was compiled. | |
| virtual int32_t | groupNumberFromName (const UnicodeString &groupName, UErrorCode &status) const |
| Get the group number corresponding to a named capture group. | |
| virtual int32_t | groupNumberFromName (const char *groupName, int32_t nameLength, UErrorCode &status) const |
| Get the group number corresponding to a named capture group. | |
| virtual int32_t | split (const UnicodeString &input, UnicodeString dest[], int32_t destCapacity, UErrorCode &status) const |
| Split a string into fields. | |
| virtual int32_t | split (UText *input, UText *dest[], int32_t destCapacity, UErrorCode &status) const |
| Split a string into fields. | |
| virtual UClassID | getDynamicClassID () const override |
| ICU "poor man's RTTI", returns a UClassID for the actual class. | |
| void | dumpPattern () const |
| Dump a compiled pattern. | |
| RegexMatcher (const UnicodeString ®exp, uint32_t flags, UErrorCode &status) | |
| Construct a RegexMatcher for a regular expression. | |
| RegexMatcher (UText *regexp, uint32_t flags, UErrorCode &status) | |
| Construct a RegexMatcher for a regular expression. | |
| RegexMatcher (const UnicodeString ®exp, const UnicodeString &input, uint32_t flags, UErrorCode &status) | |
| Construct a RegexMatcher for a regular expression. | |
| RegexMatcher (UText *regexp, UText *input, uint32_t flags, UErrorCode &status) | |
| Construct a RegexMatcher for a regular expression. | |
| virtual | ~RegexMatcher () |
| Destructor. | |
| virtual UBool | matches (UErrorCode &status) |
| Attempts to match the entire input region against the pattern. | |
| virtual UBool | matches (int64_t startIndex, UErrorCode &status) |
| Resets the matcher, then attempts to match the input beginning at the specified startIndex, and extending to the end of the input. | |
| virtual UBool | lookingAt (UErrorCode &status) |
| Attempts to match the input string, starting from the beginning of the region, against the pattern. | |
| virtual UBool | lookingAt (int64_t startIndex, UErrorCode &status) |
| Attempts to match the input string, starting from the specified index, against the pattern. | |
| virtual UBool | find () |
| Find the next pattern match in the input string. | |
| virtual UBool | find (UErrorCode &status) |
| Find the next pattern match in the input string. | |
| virtual UBool | find (int64_t start, UErrorCode &status) |
| Resets this RegexMatcher and then attempts to find the next substring of the input string that matches the pattern, starting at the specified index. | |
| virtual UnicodeString | group (UErrorCode &status) const |
| Returns a string containing the text matched by the previous match. | |
| virtual UnicodeString | group (int32_t groupNum, UErrorCode &status) const |
| Returns a string containing the text captured by the given group during the previous match operation. | |
| virtual int32_t | groupCount () const |
| Returns the number of capturing groups in this matcher's pattern. | |
| virtual UText * | group (UText *dest, int64_t &group_len, UErrorCode &status) const |
| Returns a shallow clone of the entire live input string with the UText current native index set to the beginning of the requested group. | |
| virtual UText * | group (int32_t groupNum, UText *dest, int64_t &group_len, UErrorCode &status) const |
| Returns a shallow clone of the entire live input string with the UText current native index set to the beginning of the requested group. | |
| virtual int32_t | start (UErrorCode &status) const |
| Returns the index in the input string of the start of the text matched during the previous match operation. | |
| virtual int64_t | start64 (UErrorCode &status) const |
| Returns the index in the input string of the start of the text matched during the previous match operation. | |
| virtual int32_t | start (int32_t group, UErrorCode &status) const |
| Returns the index in the input string of the start of the text matched by the specified capture group during the previous match operation. | |
| virtual int64_t | start64 (int32_t group, UErrorCode &status) const |
| Returns the index in the input string of the start of the text matched by the specified capture group during the previous match operation. | |
| virtual int32_t | end (UErrorCode &status) const |
| Returns the index in the input string of the first character following the text matched during the previous match operation. | |
| virtual int64_t | end64 (UErrorCode &status) const |
| Returns the index in the input string of the first character following the text matched during the previous match operation. | |
| virtual int32_t | end (int32_t group, UErrorCode &status) const |
| Returns the index in the input string of the character following the text matched by the specified capture group during the previous match operation. | |
| virtual int64_t | end64 (int32_t group, UErrorCode &status) const |
| Returns the index in the input string of the character following the text matched by the specified capture group during the previous match operation. | |
| virtual RegexMatcher & | reset () |
| Resets this matcher. | |
| virtual RegexMatcher & | reset (int64_t index, UErrorCode &status) |
| Resets this matcher, and set the current input position. | |
| virtual RegexMatcher & | reset (const UnicodeString &input) |
| Resets this matcher with a new input string. | |
| virtual RegexMatcher & | reset (UText *input) |
| Resets this matcher with a new input string. | |
| virtual RegexMatcher & | refreshInputText (UText *input, UErrorCode &status) |
| Set the subject text string upon which the regular expression is looking for matches without changing any other aspect of the matching state. | |
| virtual const UnicodeString & | input () const |
| Returns the input string being matched. | |
| virtual UText * | inputText () const |
| Returns the input string being matched. | |
| virtual UText * | getInput (UText *dest, UErrorCode &status) const |
| Returns the input string being matched, either by copying it into the provided UText parameter or by returning a shallow clone of the live input. | |
| virtual RegexMatcher & | region (int64_t start, int64_t limit, UErrorCode &status) |
| Sets the limits of this matcher's region. | |
| virtual RegexMatcher & | region (int64_t regionStart, int64_t regionLimit, int64_t startIndex, UErrorCode &status) |
| Identical to region(start, limit, status) but also allows a start position without resetting the region state. | |
| virtual int32_t | regionStart () const |
| Reports the start index of this matcher's region. | |
| virtual int64_t | regionStart64 () const |
| Reports the start index of this matcher's region. | |
| virtual int32_t | regionEnd () const |
| Reports the end (limit) index (exclusive) of this matcher's region. | |
| virtual int64_t | regionEnd64 () const |
| Reports the end (limit) index (exclusive) of this matcher's region. | |
| virtual UBool | hasTransparentBounds () const |
| Queries the transparency of region bounds for this matcher. | |
| virtual RegexMatcher & | useTransparentBounds (UBool b) |
| Sets the transparency of region bounds for this matcher. | |
| virtual UBool | hasAnchoringBounds () const |
| Return true if this matcher is using anchoring bounds. | |
| virtual RegexMatcher & | useAnchoringBounds (UBool b) |
| Set whether this matcher is using Anchoring Bounds for its region. | |
| virtual UBool | hitEnd () const |
| Return true if the most recent matching operation attempted to access additional input beyond the available input text. | |
| virtual UBool | requireEnd () const |
| Return true the most recent match succeeded and additional input could cause it to fail. | |
| virtual const RegexPattern & | pattern () const |
| Returns the pattern that is interpreted by this matcher. | |
| virtual UnicodeString | replaceAll (const UnicodeString &replacement, UErrorCode &status) |
| Replaces every substring of the input that matches the pattern with the given replacement string. | |
| virtual UText * | replaceAll (UText *replacement, UText *dest, UErrorCode &status) |
| Replaces every substring of the input that matches the pattern with the given replacement string. | |
| virtual UnicodeString | replaceFirst (const UnicodeString &replacement, UErrorCode &status) |
| Replaces the first substring of the input that matches the pattern with the replacement string. | |
| virtual UText * | replaceFirst (UText *replacement, UText *dest, UErrorCode &status) |
| Replaces the first substring of the input that matches the pattern with the replacement string. | |
| virtual RegexMatcher & | appendReplacement (UnicodeString &dest, const UnicodeString &replacement, UErrorCode &status) |
| Implements a replace operation intended to be used as part of an incremental find-and-replace. | |
| virtual RegexMatcher & | appendReplacement (UText *dest, UText *replacement, UErrorCode &status) |
| Implements a replace operation intended to be used as part of an incremental find-and-replace. | |
| virtual UnicodeString & | appendTail (UnicodeString &dest) |
| As the final step in a find-and-replace operation, append the remainder of the input string, starting at the position following the last appendReplacement(), to the destination string. | |
| virtual UText * | appendTail (UText *dest, UErrorCode &status) |
| As the final step in a find-and-replace operation, append the remainder of the input string, starting at the position following the last appendReplacement(), to the destination string. | |
| virtual int32_t | split (const UnicodeString &input, UnicodeString dest[], int32_t destCapacity, UErrorCode &status) |
| Split a string into fields. | |
| virtual int32_t | split (UText *input, UText *dest[], int32_t destCapacity, UErrorCode &status) |
| Split a string into fields. | |
| virtual void | setTimeLimit (int32_t limit, UErrorCode &status) |
| Set a processing time limit for match operations with this Matcher. | |
| virtual int32_t | getTimeLimit () const |
| Get the time limit, if any, for match operations made with this Matcher. | |
| virtual void | setStackLimit (int32_t limit, UErrorCode &status) |
| Set the amount of heap storage available for use by the match backtracking stack. | |
| virtual int32_t | getStackLimit () const |
| Get the size of the heap storage available for use by the back tracking stack. | |
| virtual void | setMatchCallback (URegexMatchCallback *callback, const void *context, UErrorCode &status) |
| Set a callback function for use with this Matcher. | |
| virtual void | getMatchCallback (URegexMatchCallback *&callback, const void *&context, UErrorCode &status) |
| Get the callback function for this URegularExpression. | |
| virtual void | setFindProgressCallback (URegexFindProgressCallback *callback, const void *context, UErrorCode &status) |
| Set a progress callback function for use with find operations on this Matcher. | |
| virtual void | getFindProgressCallback (URegexFindProgressCallback *&callback, const void *&context, UErrorCode &status) |
| Get the find progress callback function for this URegularExpression. | |
| void | setTrace (UBool state) |
| setTrace Debug function, enable/disable tracing of the matching engine. | |
| virtual UClassID | getDynamicClassID () const override |
| ICU "poor man's RTTI", returns a UClassID for the actual class. | |
| void | resetPreserveRegion () |
| StringSearch (const UnicodeString &pattern, const UnicodeString &text, const Locale &locale, BreakIterator *breakiter, UErrorCode &status) | |
Creating a StringSearch instance using the argument locale language rule set. | |
| StringSearch (const UnicodeString &pattern, const UnicodeString &text, RuleBasedCollator *coll, BreakIterator *breakiter, UErrorCode &status) | |
Creating a StringSearch instance using the argument collator language rule set. | |
| StringSearch (const UnicodeString &pattern, CharacterIterator &text, const Locale &locale, BreakIterator *breakiter, UErrorCode &status) | |
Creating a StringSearch instance using the argument locale language rule set. | |
| StringSearch (const UnicodeString &pattern, CharacterIterator &text, RuleBasedCollator *coll, BreakIterator *breakiter, UErrorCode &status) | |
Creating a StringSearch instance using the argument collator language rule set. | |
| StringSearch (const StringSearch &that) | |
| Copy constructor that creates a StringSearch instance with the same behavior, and iterating over the same text. | |
| virtual | ~StringSearch (void) |
| Destructor. | |
| StringSearch * | clone () const |
| Clone this object. | |
| StringSearch & | operator= (const StringSearch &that) |
| Assignment operator. | |
| virtual bool | operator== (const SearchIterator &that) const override |
| Equality operator. | |
| virtual void | setOffset (int32_t position, UErrorCode &status) override |
| Sets the index to point to the given position, and clears any state that's affected. | |
| virtual int32_t | getOffset (void) const override |
| Return the current index in the text being searched. | |
| virtual void | setText (const UnicodeString &text, UErrorCode &status) override |
| Set the target text to be searched. | |
| virtual void | setText (CharacterIterator &text, UErrorCode &status) override |
| Set the target text to be searched. | |
| RuleBasedCollator * | getCollator () const |
| Gets the collator used for the language rules. | |
| void | setCollator (RuleBasedCollator *coll, UErrorCode &status) |
| Sets the collator used for the language rules. | |
| void | setPattern (const UnicodeString &pattern, UErrorCode &status) |
| Sets the pattern used for matching. | |
| const UnicodeString & | getPattern () const |
| Gets the search pattern. | |
| virtual void | reset () override |
| Reset the iteration. | |
| virtual StringSearch * | safeClone () const override |
| Returns a copy of StringSearch with the same behavior, and iterating over the same text, as this one. | |
| virtual UClassID | getDynamicClassID () const override |
| ICU "poor man's RTTI", returns a UClassID for the actual class. | |
| RuleBasedCollator (const UnicodeString &rules, UErrorCode &status) | |
| RuleBasedCollator constructor. | |
| RuleBasedCollator (const UnicodeString &rules, ECollationStrength collationStrength, UErrorCode &status) | |
| RuleBasedCollator constructor. | |
| RuleBasedCollator (const UnicodeString &rules, UColAttributeValue decompositionMode, UErrorCode &status) | |
| RuleBasedCollator constructor. | |
| RuleBasedCollator (const UnicodeString &rules, ECollationStrength collationStrength, UColAttributeValue decompositionMode, UErrorCode &status) | |
| RuleBasedCollator constructor. | |
| RuleBasedCollator (const UnicodeString &rules, UParseError &parseError, UnicodeString &reason, UErrorCode &errorCode) | |
| TODO: document & propose as public API. | |
| RuleBasedCollator (const RuleBasedCollator &other) | |
| Copy constructor. | |
| RuleBasedCollator (const uint8_t *bin, int32_t length, const RuleBasedCollator *base, UErrorCode &status) | |
| Opens a collator from a collator binary image created using cloneBinary. | |
| virtual | ~RuleBasedCollator () |
| Destructor. | |
| RuleBasedCollator & | operator= (const RuleBasedCollator &other) |
| Assignment operator. | |
| virtual bool | operator== (const Collator &other) const override |
| Returns true if argument is the same as this object. | |
| virtual RuleBasedCollator * | clone () const override |
| Makes a copy of this object. | |
| virtual CollationElementIterator * | createCollationElementIterator (const UnicodeString &source) const |
| Creates a collation element iterator for the source string. | |
| virtual CollationElementIterator * | createCollationElementIterator (const CharacterIterator &source) const |
| Creates a collation element iterator for the source. | |
| virtual UCollationResult | compare (const UnicodeString &source, const UnicodeString &target, UErrorCode &status) const override |
| The comparison function compares the character data stored in two different strings. | |
| virtual UCollationResult | compare (const UnicodeString &source, const UnicodeString &target, int32_t length, UErrorCode &status) const override |
| Does the same thing as compare but limits the comparison to a specified length. | |
| virtual UCollationResult | compare (const char16_t *source, int32_t sourceLength, const char16_t *target, int32_t targetLength, UErrorCode &status) const override |
| The comparison function compares the character data stored in two different string arrays. | |
| virtual UCollationResult | compare (UCharIterator &sIter, UCharIterator &tIter, UErrorCode &status) const override |
| Compares two strings using the Collator. | |
| virtual UCollationResult | compareUTF8 (const StringPiece &source, const StringPiece &target, UErrorCode &status) const override |
| Compares two UTF-8 strings using the Collator. | |
| virtual CollationKey & | getCollationKey (const UnicodeString &source, CollationKey &key, UErrorCode &status) const override |
| Transforms the string into a series of characters that can be compared with CollationKey.compare(). | |
| virtual CollationKey & | getCollationKey (const char16_t *source, int32_t sourceLength, CollationKey &key, UErrorCode &status) const override |
| Transforms a specified region of the string into a series of characters that can be compared with CollationKey.compare. | |
| virtual int32_t | hashCode () const override |
| Generates the hash code for the rule-based collation object. | |
| virtual Locale | getLocale (ULocDataLocaleType type, UErrorCode &status) const override |
| Gets the locale of the Collator. | |
| const UnicodeString & | getRules () const |
| Gets the tailoring rules for this collator. | |
| virtual void | getVersion (UVersionInfo info) const override |
| Gets the version information for a Collator. | |
| int32_t | getMaxExpansion (int32_t order) const |
| Returns the maximum length of any expansion sequences that end with the specified comparison order. | |
| virtual UClassID | getDynamicClassID (void) const override |
| Returns a unique class ID POLYMORPHICALLY. | |
| uint8_t * | cloneRuleData (int32_t &length, UErrorCode &status) const |
| Do not use this method: The caller and the ICU library might use different heaps. | |
| int32_t | cloneBinary (uint8_t *buffer, int32_t capacity, UErrorCode &status) const |
| Creates a binary image of a collator. | |
| void | getRules (UColRuleOption delta, UnicodeString &buffer) const |
| Returns current rules. | |
| virtual void | setAttribute (UColAttribute attr, UColAttributeValue value, UErrorCode &status) override |
| Universal attribute setter. | |
| virtual UColAttributeValue | getAttribute (UColAttribute attr, UErrorCode &status) const override |
| Universal attribute getter. | |
| virtual Collator & | setMaxVariable (UColReorderCode group, UErrorCode &errorCode) override |
| Sets the variable top to the top of the specified reordering group. | |
| virtual UColReorderCode | getMaxVariable () const override |
| Returns the maximum reordering group whose characters are affected by UCOL_ALTERNATE_HANDLING. | |
| virtual uint32_t | setVariableTop (const char16_t *varTop, int32_t len, UErrorCode &status) override |
| Sets the variable top to the primary weight of the specified string. | |
| virtual uint32_t | setVariableTop (const UnicodeString &varTop, UErrorCode &status) override |
| Sets the variable top to the primary weight of the specified string. | |
| virtual void | setVariableTop (uint32_t varTop, UErrorCode &status) override |
| Sets the variable top to the specified primary weight. | |
| virtual uint32_t | getVariableTop (UErrorCode &status) const override |
| Gets the variable top value of a Collator. | |
| virtual UnicodeSet * | getTailoredSet (UErrorCode &status) const override |
| Get a UnicodeSet that contains all the characters and sequences tailored in this collator. | |
| virtual int32_t | getSortKey (const UnicodeString &source, uint8_t *result, int32_t resultLength) const override |
| Get the sort key as an array of bytes from a UnicodeString. | |
| virtual int32_t | getSortKey (const char16_t *source, int32_t sourceLength, uint8_t *result, int32_t resultLength) const override |
| Get the sort key as an array of bytes from a char16_t buffer. | |
| virtual int32_t | getReorderCodes (int32_t *dest, int32_t destCapacity, UErrorCode &status) const override |
| Retrieves the reordering codes for this collator. | |
| virtual void | setReorderCodes (const int32_t *reorderCodes, int32_t reorderCodesLength, UErrorCode &status) override |
| Sets the ordering of scripts for this collator. | |
| virtual UCollationResult | internalCompareUTF8 (const char *left, int32_t leftLength, const char *right, int32_t rightLength, UErrorCode &errorCode) const override |
| Implements ucol_strcollUTF8(). | |
| virtual int32_t | internalGetShortDefinitionString (const char *locale, char *buffer, int32_t capacity, UErrorCode &status) const override |
| Get the short definition string for a collator. | |
| virtual int32_t | internalNextSortKeyPart (UCharIterator *iter, uint32_t state[2], uint8_t *dest, int32_t count, UErrorCode &errorCode) const override |
| Implements ucol_nextSortKeyPart(). | |
| RuleBasedCollator () | |
| Only for use in ucol_openRules(). | |
| const char * | internalGetLocaleID (ULocDataLocaleType type, UErrorCode &errorCode) const |
| Implements ucol_getLocaleByType(). | |
| void | internalGetContractionsAndExpansions (UnicodeSet *contractions, UnicodeSet *expansions, UBool addPrefixes, UErrorCode &errorCode) const |
| Implements ucol_getContractionsAndExpansions(). | |
| void | internalAddContractions (UChar32 c, UnicodeSet &set, UErrorCode &errorCode) const |
| Adds the contractions that start with character c to the set. | |
| void | internalBuildTailoring (const UnicodeString &rules, int32_t strength, UColAttributeValue decompositionMode, UParseError *outParseError, UnicodeString *outReason, UErrorCode &errorCode) |
| Implements from-rule constructors, and ucol_openRules(). | |
| void | internalGetCEs (const UnicodeString &str, UVector64 &ces, UErrorCode &errorCode) const |
| Appends the CEs for the string to the vector. | |
Static Public Member Functions | |
| static void | permute (UnicodeString &source, UBool skipZeros, Hashtable *result, UErrorCode &status) |
| Dumb recursive implementation of permutation. | |
| static UClassID | getStaticClassID () |
| ICU "poor man's RTTI", returns a UClassID for this class. | |
| static int32_t | toLower (const char *locale, uint32_t options, const char16_t *src, int32_t srcLength, char16_t *dest, int32_t destCapacity, Edits *edits, UErrorCode &errorCode) |
| Lowercases a UTF-16 string and optionally records edits. | |
| static int32_t | toUpper (const char *locale, uint32_t options, const char16_t *src, int32_t srcLength, char16_t *dest, int32_t destCapacity, Edits *edits, UErrorCode &errorCode) |
| Uppercases a UTF-16 string and optionally records edits. | |
| static int32_t | toTitle (const char *locale, uint32_t options, BreakIterator *iter, const char16_t *src, int32_t srcLength, char16_t *dest, int32_t destCapacity, Edits *edits, UErrorCode &errorCode) |
| Titlecases a UTF-16 string and optionally records edits. | |
| static int32_t | fold (uint32_t options, const char16_t *src, int32_t srcLength, char16_t *dest, int32_t destCapacity, Edits *edits, UErrorCode &errorCode) |
| Case-folds a UTF-16 string and optionally records edits. | |
| static void | utf8ToLower (const char *locale, uint32_t options, StringPiece src, ByteSink &sink, Edits *edits, UErrorCode &errorCode) |
| Lowercases a UTF-8 string and optionally records edits. | |
| static void | utf8ToUpper (const char *locale, uint32_t options, StringPiece src, ByteSink &sink, Edits *edits, UErrorCode &errorCode) |
| Uppercases a UTF-8 string and optionally records edits. | |
| static void | utf8ToTitle (const char *locale, uint32_t options, BreakIterator *iter, StringPiece src, ByteSink &sink, Edits *edits, UErrorCode &errorCode) |
| Titlecases a UTF-8 string and optionally records edits. | |
| static void | utf8Fold (uint32_t options, StringPiece src, ByteSink &sink, Edits *edits, UErrorCode &errorCode) |
| Case-folds a UTF-8 string and optionally records edits. | |
| static int32_t | utf8ToLower (const char *locale, uint32_t options, const char *src, int32_t srcLength, char *dest, int32_t destCapacity, Edits *edits, UErrorCode &errorCode) |
| Lowercases a UTF-8 string and optionally records edits. | |
| static int32_t | utf8ToUpper (const char *locale, uint32_t options, const char *src, int32_t srcLength, char *dest, int32_t destCapacity, Edits *edits, UErrorCode &errorCode) |
| Uppercases a UTF-8 string and optionally records edits. | |
| static int32_t | utf8ToTitle (const char *locale, uint32_t options, BreakIterator *iter, const char *src, int32_t srcLength, char *dest, int32_t destCapacity, Edits *edits, UErrorCode &errorCode) |
| Titlecases a UTF-8 string and optionally records edits. | |
| static int32_t | utf8Fold (uint32_t options, const char *src, int32_t srcLength, char *dest, int32_t destCapacity, Edits *edits, UErrorCode &errorCode) |
| Case-folds a UTF-8 string and optionally records edits. | |
| static UnicodeSet * | fromUSet (USet *uset) |
| Get a UnicodeSet pointer from a USet. | |
| static const UnicodeSet * | fromUSet (const USet *uset) |
| Get a UnicodeSet pointer from a const USet. | |
| static UBool | resemblesPattern (const UnicodeString &pattern, int32_t pos) |
| Return true if the given position, in the given pattern, appears to be the start of a UnicodeSet pattern. | |
| static UnicodeSet * | createFrom (const UnicodeString &s) |
| Makes a set from a multicharacter string. | |
| static UnicodeSet * | createFromAll (const UnicodeString &s) |
| Makes a set from each of the characters in the string. | |
| static UClassID | getStaticClassID (void) |
| Return the class ID for this class. | |
| static UClassID | getStaticClassID () |
| ICU "poor man's RTTI", returns a UClassID for this class. | |
| static int32_t | primaryOrder (int32_t order) |
| Gets the primary order of a collation order. | |
| static int32_t | secondaryOrder (int32_t order) |
| Gets the secondary order of a collation order. | |
| static int32_t | tertiaryOrder (int32_t order) |
| Gets the tertiary order of a collation order. | |
| static UBool | isIgnorable (int32_t order) |
| Checks if a comparison order is ignorable. | |
| static UClassID | getStaticClassID () |
| ICU "poor man's RTTI", returns a UClassID for this class. | |
| static CollationElementIterator * | fromUCollationElements (UCollationElements *uc) |
| static const CollationElementIterator * | fromUCollationElements (const UCollationElements *uc) |
| static const char16_t * | getPatternUChars (void) |
| Get the non-localized date-time pattern characters. | |
| static UClassID | getStaticClassID () |
| ICU "poor man's RTTI", returns a UClassID for this class. | |
| static DateFormatSymbols * | createForLocale (const Locale &locale, UErrorCode &status) |
| Gets a DateFormatSymbols by locale. | |
| static UClassID | getStaticClassID () |
| ICU "poor man's RTTI", returns a UClassID for this class. | |
| static RegexPattern * | compile (const UnicodeString ®ex, UParseError &pe, UErrorCode &status) |
| Compiles the regular expression in string form into a RegexPattern object. | |
| static RegexPattern * | compile (UText *regex, UParseError &pe, UErrorCode &status) |
| Compiles the regular expression in string form into a RegexPattern object. | |
| static RegexPattern * | compile (const UnicodeString ®ex, uint32_t flags, UParseError &pe, UErrorCode &status) |
| Compiles the regular expression in string form into a RegexPattern object using the specified URegexpFlag match mode flags. | |
| static RegexPattern * | compile (UText *regex, uint32_t flags, UParseError &pe, UErrorCode &status) |
| Compiles the regular expression in string form into a RegexPattern object using the specified URegexpFlag match mode flags. | |
| static RegexPattern * | compile (const UnicodeString ®ex, uint32_t flags, UErrorCode &status) |
| Compiles the regular expression in string form into a RegexPattern object using the specified URegexpFlag match mode flags. | |
| static RegexPattern * | compile (UText *regex, uint32_t flags, UErrorCode &status) |
| Compiles the regular expression in string form into a RegexPattern object using the specified URegexpFlag match mode flags. | |
| static UBool | matches (const UnicodeString ®ex, const UnicodeString &input, UParseError &pe, UErrorCode &status) |
| Test whether a string matches a regular expression. | |
| static UBool | matches (UText *regex, UText *input, UParseError &pe, UErrorCode &status) |
| Test whether a string matches a regular expression. | |
| static UClassID | getStaticClassID () |
| ICU "poor man's RTTI", returns a UClassID for this class. | |
| static UClassID | getStaticClassID () |
| ICU "poor man's RTTI", returns a UClassID for this class. | |
| static UClassID | getStaticClassID () |
| ICU "poor man's RTTI", returns a UClassID for this class. | |
| static UClassID | getStaticClassID (void) |
| Returns the class ID for this class. | |
| static RuleBasedCollator * | rbcFromUCollator (UCollator *uc) |
| static const RuleBasedCollator * | rbcFromUCollator (const UCollator *uc) |
Static Public Attributes | |
| static const char16_t | DEFAULT_TIME_SEPARATOR = 0x003a |
| This default time separator is used for formatting when the locale doesn't specify any time separator, and always recognized when parsing. | |
| static const char16_t | ALTERNATE_TIME_SEPARATOR = 0x002e |
| This alternate time separator is always recognized when parsing. | |
Protected Member Functions | |
| virtual int32_t | handleNext (int32_t position, UErrorCode &status) override |
| Search forward for matching text, starting at a given location. | |
| virtual int32_t | handlePrev (int32_t position, UErrorCode &status) override |
| Search backward for matching text, starting at a given location. | |
| virtual void | setLocales (const Locale &requestedLocale, const Locale &validLocale, const Locale &actualLocale) override |
| Used internally by registration to define the requested and valid locales. | |
Friends | |
| class | number::impl::SimpleModifier |
| class | USetAccess |
| class | RBBIRuleScanner |
| class | UnicodeSetIterator |
| class | RuleBasedCollator |
| class | UCollationPCE |
| class | SimpleDateFormat |
| class | DateFormatSymbolsSingleSetter |
| class | DateIntervalFormat |
| DateIntervalFormat will need access to getBestSkeleton(), parseSkeleton(), enum IntervalPatternIndex, and calendarFieldToPatternIndex(). | |
| class | RegexCompile |
| class | RegexMatcher |
| class | RegexCImpl |
| class | RegexPattern |
| class | CollationElementIterator |
| class | Collator |
This class allows one to iterate through all the strings that are canonically equivalent to a given string.
The RuleBasedCollator class provides the implementation of Collator, using data-driven tables.
StringSearch is a SearchIterator that provides language-sensitive text searching based on the comparison rules defined in a RuleBasedCollator object.
class RegexMatcher bundles together a regular expression pattern and input text to which the expression can be applied.
Class `RegexPattern` represents a compiled regular expression.
DateIntervalInfo is a public class for encapsulating localizable date time interval patterns.
DateFormatSymbols is a public class for encapsulating localizable date-time formatting data -- including timezone data.
The CollationElementIterator class is used as an iterator to walk through each character of an international string.
UnicodeSetIterator iterates over the contents of a UnicodeSet.
A mutable set of Unicode characters and multicharacter strings.
Formats simple patterns like "{1} was born in {0}".
Records lengths of string edits but not replacement text.
const char16_t * wrapper with implicit conversion from distinct but bit-compatible pointer types.
char16_t * wrapper with implicit conversion from distinct but bit-compatible pointer types.
Low-level C++ case mapping functions.
For example, here are some sample results: Results for: {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D}{COMBINING DOT ABOVE}{COMBINING CEDILLA} 1: \u0041\u030A\u0064\u0307\u0327 = {LATIN CAPITAL LETTER A}{COMBINING RING ABOVE}{LATIN SMALL LETTER D}{COMBINING DOT ABOVE}{COMBINING CEDILLA} 2: \u0041\u030A\u0064\u0327\u0307 = {LATIN CAPITAL LETTER A}{COMBINING RING ABOVE}{LATIN SMALL LETTER D}{COMBINING CEDILLA}{COMBINING DOT ABOVE} 3: \u0041\u030A\u1E0B\u0327 = {LATIN CAPITAL LETTER A}{COMBINING RING ABOVE}{LATIN SMALL LETTER D WITH DOT ABOVE}{COMBINING CEDILLA} 4: \u0041\u030A\u1E11\u0307 = {LATIN CAPITAL LETTER A}{COMBINING RING ABOVE}{LATIN SMALL LETTER D WITH CEDILLA}{COMBINING DOT ABOVE} 5: \u00C5\u0064\u0307\u0327 = {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D}{COMBINING DOT ABOVE}{COMBINING CEDILLA} 6: \u00C5\u0064\u0327\u0307 = {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D}{COMBINING CEDILLA}{COMBINING DOT ABOVE} 7: \u00C5\u1E0B\u0327 = {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D WITH DOT ABOVE}{COMBINING CEDILLA} 8: \u00C5\u1E11\u0307 = {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D WITH CEDILLA}{COMBINING DOT ABOVE} 9: \u212B\u0064\u0307\u0327 = {ANGSTROM SIGN}{LATIN SMALL LETTER D}{COMBINING DOT ABOVE}{COMBINING CEDILLA} 10: \u212B\u0064\u0327\u0307 = {ANGSTROM SIGN}{LATIN SMALL LETTER D}{COMBINING CEDILLA}{COMBINING DOT ABOVE} 11: \u212B\u1E0B\u0327 = {ANGSTROM SIGN}{LATIN SMALL LETTER D WITH DOT ABOVE}{COMBINING CEDILLA} 12: \u212B\u1E11\u0307 = {ANGSTROM SIGN}{LATIN SMALL LETTER D WITH CEDILLA}{COMBINING DOT ABOVE}
Note: the code is intended for use with small strings, and is not suitable for larger ones, since it has not been optimized for that situation. Note, CanonicalIterator is not intended to be subclassed.
Supports replacements, insertions, deletions in linear progression. Does not support moving/reordering of text.
There are two types of edits: change edits and no-change edits. Add edits to instances of this class using addReplace(int32_t, int32_t) (for change edits) and addUnchanged(int32_t) (for no-change edits). Change edits are retained with full granularity, whereas adjacent no-change edits are always merged together. In no-change edits, there is a one-to-one mapping between code points in the source and destination strings.
After all edits have been added, instances of this class should be considered immutable, and an Edits::Iterator can be used for queries.
There are four flavors of Edits::Iterator:
For example, consider the string "abcßDeF", which case-folds to "abcssdef". This string has the following fine edits:
and the following coarse edits (note how adjacent change edits get merged together):
The "fine changes" and "coarse changes" iterators will step through only the change edits when their `Edits::Iterator::next()` methods are called. They are identical to the non-change iterators when their `Edits::Iterator::findSourceIndex()` or `Edits::Iterator::findDestinationIndex()` methods are used to walk through the string.
For examples of how to use this class, see the test `TestCaseMapEditsIteratorDocs` in UCharacterCaseTest.java.
An Edits object tracks a separate UErrorCode, but ICU string transformation functions (e.g., case mapping functions) merge any such errors into their API's UErrorCode.
Minimal subset of MessageFormat; fast, simple, minimal dependencies. Supports only numbered arguments with no type nor style parameters, and formats only string values. Quoting via ASCII apostrophe compatible with ICU MessageFormat default behavior.
Factory methods set error codes for syntax errors and for too few or too many arguments/placeholders.
SimpleFormatter objects are thread-safe except for assignment and applying new patterns.
Example:
UErrorCode errorCode = U_ZERO_ERROR;
SimpleFormatter fmt("{1} '{born}' in {0}", errorCode);
UnicodeString result; // Output: "paul {born} in england"
fmt.format("england", "paul", result, errorCode);
This class is not intended for public subclassing.
Objects of this class represent character classes used in regular expressions. A character specifies a subset of Unicode code points. Legal code points are U+0000 to U+10FFFF, inclusive.
The UnicodeSet class is not designed to be subclassed.
UnicodeSet supports two APIs. The first is the operand API that allows the caller to modify the value of a UnicodeSet object. It conforms to Java 2's java.util.Set interface, although UnicodeSet does not actually implement that interface. All methods of Set are supported, with the modification that they take a character range or single character instead of an Object, and they take a UnicodeSet instead of a Collection. The operand API may be thought of in terms of boolean logic: a boolean OR is implemented by add, a boolean AND is implemented by retain, a boolean XOR is implemented by complement taking an argument, and a boolean NOT is implemented by complement with no argument. In terms of traditional set theory function names, add is a union, retain is an intersection, remove is an asymmetric difference, and complement with no argument is a set complement with respect to the superset range MIN_VALUE-MAX_VALUE
The second API is the applyPattern()/toPattern() API from the java.text.Format-derived classes. Unlike the methods that add characters, add categories, and control the logic of the set, the method applyPattern() sets all attributes of a UnicodeSet at once, based on a string pattern.
Pattern syntax
Patterns are accepted by the constructors and the applyPattern() methods and returned by the toPattern() method. These patterns follow a syntax similar to that employed by version 8 regular expression character classes. Here are some simple examples:
[]No characters [a]The character 'a' [ae]The characters 'a' and 'e' [a-e]The characters 'a' through 'e' inclusive, in Unicode code point order [\u4E01]The character U+4E01 [a{ab}{ac}]The character 'a' and the multicharacter strings "ab" and "ac" [\p{Lu}]All characters in the general category Uppercase Letter
Any character may be preceded by a backslash in order to remove any special meaning. White space characters, as defined by UCharacter.isWhitespace(), are ignored, unless they are escaped.
Property patterns specify a set of characters having a certain property as defined by the Unicode standard. Both the POSIX-like "[:Lu:]" and the Perl-like syntax "\\p{Lu}" are recognized. For a complete list of supported property patterns, see the User's Guide for UnicodeSet at https://unicode-org.github.io/icu/userguide/strings/unicodeset. Actual determination of property data is defined by the underlying Unicode database as implemented by UCharacter.
Patterns specify individual characters, ranges of characters, and Unicode property sets. When elements are concatenated, they specify their union. To complement a set, place a '^' immediately after the opening '['. Property patterns are inverted by modifying their delimiters; "[:^foo]" and "\\P{foo}". In any other location, '^' has no special meaning.
Since ICU 70, "[^...]", "[:^foo]", "\\P{foo}", and "[:binaryProperty=No:]" perform a “code point complement” (all code points minus the original set), removing all multicharacter strings, equivalent to .complement().removeAllStrings(). The complement() API function continues to perform a symmetric difference with all code points and thus retains all multicharacter strings.
Ranges are indicated by placing two a '-' between two characters, as in "a-z". This specifies the range of all characters from the left to the right, in Unicode order. If the left character is greater than or equal to the right character it is a syntax error. If a '-' occurs as the first character after the opening '[' or '[^', or if it occurs as the last character before the closing ']', then it is taken as a literal. Thus "[a\-b]", "[-ab]", and "[ab-]" all indicate the same set of three characters, 'a', 'b', and '-'.
Sets may be intersected using the '&' operator or the asymmetric set difference may be taken using the '-' operator, for example, "[[:L:]&[\\u0000-\\u0FFF]]" indicates the set of all Unicode letters with values less than 4096. Operators ('&' and '|') have equal precedence and bind left-to-right. Thus "[[:L:]-[a-z]-[\\u0100-\\u01FF]]" is equivalent to "[[[:L:]-[a-z]]-[\\u0100-\\u01FF]]". This only really matters for difference; intersection is commutative.
[a] | The set containing 'a' |
[a-z] | The set containing 'a' through 'z' and all letters in between, in Unicode order |
[^a-z] | The set containing all characters but 'a' through 'z', that is, U+0000 through 'a'-1 and 'z'+1 through U+10FFFF |
[[pat1][pat2]] | The union of sets specified by pat1 and pat2 |
[[pat1]&[pat2]] | The intersection of sets specified by pat1 and pat2 |
[[pat1]-[pat2]] | The asymmetric difference of sets specified by pat1 and pat2 |
[:Lu:] or \p{Lu} | The set of characters having the specified Unicode property; in this case, Unicode uppercase letters |
[:^Lu:] or \P{Lu} | The set of characters not having the given Unicode property |
Formal syntax
pattern :=('[' '^'? item* ']') | propertyitem :=char | (char '-' char) | pattern-expr
pattern-expr :=pattern | pattern-expr pattern | pattern-expr op pattern
op :='&' | '-'
special :='[' | ']' | '-'
char :=any character that is not specialany character
| ('\')
| ('\u' hex hex hex hex)
hex :='0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' |
'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f'property :=a Unicode property set pattern
Legend:
a := bamay be replaced byba?zero or one instance of a
a*one or more instances of a
a | beither aorb
'a'the literal string between the quotes
Note:
It iterates over either code points or code point ranges. After all code points or ranges have been returned, it returns the multicharacter strings of the UnicodeSet, if any.
This class is not intended for public subclassing.
To iterate over code points and strings, use a loop like this:
UnicodeSetIterator it(set);
while (it.next()) {
processItem(it.getString());
}
Each item in the set is accessed as a string. Set elements consisting of single code points are returned as strings containing just the one code point.
To iterate over code point ranges, instead of individual code points, use a loop like this:
UnicodeSetIterator it(set);
while (it.nextRange()) {
if (it.isString()) {
processString(it.getString());
} else {
processCodepointRange(it.getCodepoint(), it.getCodepointEnd());
}
}
To iterate over only the strings, start with skipToStrings().
Use the iterator to return the ordering priority of the positioned character. The ordering priority of a character, which we refer to as a key, defines how a character is collated in the given collation object. For example, consider the following in Slovak and in traditional Spanish collation:
"ca" -> the first key is key('c') and second key is key('a').
"cha" -> the first key is key('ch') and second key is key('a').And in German phonebook collation,
"æb"-> the first key is key('a'), the second key is key('e'), and
the third key is key('b'). The key of a character, is an integer composed of primary order(short), secondary order(char), and tertiary order(char). Java strictly defines the size and signedness of its primitive data types. Therefore, the static functions primaryOrder(), secondaryOrder(), and tertiaryOrder() return int32_t to ensure the correctness of the key value.
Example of the iterator usage: (without error checking)
void CollationElementIterator_Example() { UnicodeString str = "This is a test"; UErrorCode success = U_ZERO_ERROR; RuleBasedCollator* rbc = (RuleBasedCollator*) RuleBasedCollator::createInstance(success); CollationElementIterator* c = rbc->createCollationElementIterator( str ); int32_t order = c->next(success); c->reset(); order = c->previous(success); delete c; delete rbc; }
The method next() returns the collation order of the next character based on the comparison level of the collator. The method previous() returns the collation order of the previous character based on the comparison level of the collator. The Collation Element Iterator moves only in one direction between calls to reset(), setOffset(), or setText(). That is, next() and previous() can not be inter-used. Whenever previous() is to be called after next() or vice versa, reset(), setOffset() or setText() has to be called first to reset the status, shifting pointers to either the end or the start of the string (reset() or setText()), or the specified position (setOffset()). Hence at the next call of next() or previous(), the first or last collation order, or collation order at the specified position will be returned. If a change of direction is done without one of these calls, the result is undefined.
The result of a forward iterate (next()) and reversed result of the backward iterate (previous()) on the same string are equivalent, if collation orders with the value 0 are ignored. Character based on the comparison level of the collator. A collation order consists of primary order, secondary order and tertiary order. The data type of the collation order is int32_t.
Note, CollationElementIterator should not be subclassed.
DateFormatSymbols is used by DateFormat and SimpleDateFormat.
Rather than first creating a DateFormatSymbols to get a date-time formatter by using a SimpleDateFormat constructor, clients are encouraged to create a date-time formatter using the getTimeInstance(), getDateInstance(), or getDateTimeInstance() method in DateFormat. Each of these methods can return a date/time formatter initialized with a default format pattern along with the date-time formatting data for a given or default locale. After a formatter is created, clients may modify the format pattern using the setPattern function as so desired. For more information on using these formatter factory functions, see DateFormat.
If clients decide to create a date-time formatter with a particular format pattern and locale, they can do so with new SimpleDateFormat(aPattern, new DateFormatSymbols(aLocale)). This will load the appropriate date-time formatting data from the locale.
DateFormatSymbols objects are clonable. When clients obtain a DateFormatSymbols object, they can feel free to modify the date-time formatting data as necessary. For instance, clients can replace the localized date-time format pattern characters with the ones that they feel easy to remember. Or they can change the representative cities originally picked by default to using their favorite ones.
DateFormatSymbols are not expected to be subclassed. Data for a calendar is loaded out of resource bundles. The 'type' parameter indicates the type of calendar, for example, "gregorian" or "japanese". If the type is not gregorian (or nullptr, or an empty string) then the type is appended to the resource name, for example, 'Eras_japanese' instead of 'Eras'. If the resource 'Eras_japanese' did not exist (even in root), then this class will fall back to just 'Eras', that is, Gregorian data. Therefore, the calendar implementor MUST ensure that the root locale at least contains any resources that are to be particularized for the calendar type.
It is used by DateIntervalFormat.
For most users, ordinary use of DateIntervalFormat does not need to create DateIntervalInfo object directly. DateIntervalFormat will take care of it when creating a date interval formatter when user pass in skeleton and locale.
For power users, who want to create their own date interval patterns, or want to re-set date interval patterns, they could do so by directly creating DateIntervalInfo and manipulating it.
Logically, the interval patterns are mappings from (skeleton, the_largest_different_calendar_field) to (date_interval_pattern).
A skeleton
might hide a field's pattern letter length.
For those non-digit calendar fields, the pattern letter length is important, such as MMM, MMMM, and MMMMM; EEE and EEEE, and the field's pattern letter length is honored.
For the digit calendar fields, such as M or MM, d or dd, yy or yyyy, the field pattern length is ignored and the best match, which is defined in date time patterns, will be returned without honor the field pattern letter length in skeleton.
The calendar fields we support for interval formatting are: year, month, date, day-of-week, am-pm, hour, hour-of-day, and minute. Those calendar fields can be defined in the following order: year > month > date > am-pm > hour > minute
The largest different calendar fields between 2 calendars is the first different calendar field in above order.
For example: the largest different calendar fields between "Jan 10, 2007" and "Feb 20, 2008" is year.
There is a set of pre-defined static skeleton strings. There are pre-defined interval patterns for those pre-defined skeletons in locales' resource files. For example, for a skeleton UDAT_YEAR_ABBR_MONTH_DAY, which is "yMMMd", in en_US, if the largest different calendar field between date1 and date2 is "year", the date interval pattern is "MMM d, yyyy - MMM d, yyyy", such as "Jan 10, 2007 - Jan 10, 2008". If the largest different calendar field between date1 and date2 is "month", the date interval pattern is "MMM d - MMM d, yyyy", such as "Jan 10 - Feb 10, 2007". If the largest different calendar field between date1 and date2 is "day", the date interval pattern is "MMM d-d, yyyy", such as "Jan 10-20, 2007".
For date skeleton, the interval patterns when year, or month, or date is different are defined in resource files. For time skeleton, the interval patterns when am/pm, or hour, or minute is different are defined in resource files.
There are 2 dates in interval pattern. For most locales, the first date in an interval pattern is the earlier date. There might be a locale in which the first date in an interval pattern is the later date. We use fallback format for the default order for the locale. For example, if the fallback format is "{0} - {1}", it means the first date in the interval pattern for this locale is earlier date. If the fallback format is "{1} - {0}", it means the first date is the later date. For a particular interval pattern, the default order can be overridden by prefixing "latestFirst:" or "earliestFirst:" to the interval pattern. For example, if the fallback format is "{0}-{1}", but for skeleton "yMMMd", the interval pattern when day is different is "latestFirst:d-d MMM yy", it means by default, the first date in interval pattern is the earlier date. But for skeleton "yMMMd", when day is different, the first date in "d-d MMM yy" is the later date.
The recommended way to create a DateIntervalFormat object is to pass in the locale. By using a Locale parameter, the DateIntervalFormat object is initialized with the pre-defined interval patterns for a given or default locale.
Users can also create DateIntervalFormat object by supplying their own interval patterns. It provides flexibility for power users.
After a DateIntervalInfo object is created, clients may modify the interval patterns using setIntervalPattern function as so desired. Currently, users can only set interval patterns when the following calendar fields are different: ERA, YEAR, MONTH, DATE, DAY_OF_MONTH, DAY_OF_WEEK, AM_PM, HOUR, HOUR_OF_DAY, MINUTE, SECOND, and MILLISECOND. Interval patterns when other calendar fields are different is not supported.
DateIntervalInfo objects are cloneable. When clients obtain a DateIntervalInfo object, they can feel free to modify it as necessary.
DateIntervalInfo are not expected to be subclassed. Data for a calendar is loaded out of resource bundles. Through ICU 4.4, date interval patterns are only supported in the Gregorian calendar; non-Gregorian calendars are supported from ICU 4.4.1.
It includes factory methods for creating a RegexPattern object from the source (string) form of a regular expression, methods for creating RegexMatchers that allow the pattern to be applied to input text, and a few convenience methods for simple common uses of regular expressions.
Class RegexPattern is not intended to be subclassed.
It includes methods for testing for matches, and for find and replace operations.
Class RegexMatcher is not intended to be subclassed.
StringSearch ensures that language eccentricity can be handled, e.g. for the German collator, characters ß and SS will be matched if case is chosen to be ignored. See the "ICU Collation Design Document" for more information.
There are 2 match options for selection:
Let S' be the sub-string of a text string S between the offsets start and end [start, end].
A pattern string P matches a text string S at the offsets [start, end] if
option 1. Some canonical equivalent of P matches some canonical equivalent
of S'
option 2. P matches S' and if P starts or ends with a combining mark,
there exists no non-ignorable combining mark before or after S?
in S respectively.
Option 2. will be the default.
This search has APIs similar to that of other text iteration mechanisms such as the break iterators in BreakIterator. Using these APIs, it is easy to scan through text looking for all occurrences of a given pattern. This search iterator allows changing of direction by calling a reset followed by a next or previous. Though a direction change can occur without calling reset first, this operation comes with some speed penalty. Match results in the forward direction will match the result matches in the backwards direction in the reverse order
SearchIterator provides APIs to specify the starting position within the text string to be searched, e.g. setOffset, preceding and following. Since the starting position will be set as it is specified, please take note that there are some danger points which the search may render incorrect results:
A BreakIterator can be used if only matches at logical breaks are desired. Using a BreakIterator will only give you results that exactly matches the boundaries given by the breakiterator. For instance the pattern "e" will not be found in the string "\u00e9" if a character break iterator is used.
Options are provided to handle overlapping matches. E.g. In English, overlapping matches produces the result 0 and 2 for the pattern "abab" in the text "ababab", where else mutually exclusive matches only produce the result of 0.
Though collator attributes will be taken into consideration while performing matches, there are no APIs here for setting and getting the attributes. These attributes can be set by getting the collator from getCollator and using the APIs in coll.h. Lastly to update StringSearch to the new collator attributes, reset has to be called.
Restriction:
Currently there are no composite characters that consists of a character with combining class > 0 before a character with combining class == 0. However, if such a character exists in the future, StringSearch does not guarantee the results for option 1.
Consult the SearchIterator documentation for information on and examples of how to use instances of this class to implement text searching.
UnicodeString target("The quick brown fox jumps over the lazy dog.");
UnicodeString pattern("fox"); UErrorCode error = U_ZERO_ERROR;
StringSearch iter(pattern, target, Locale::getUS(), nullptr, status);
for (int pos = iter.first(error);
pos != USEARCH_DONE;
pos = iter.next(error))
{
printf("Found match at %d pos, length is %d\n", pos, iter.getMatchedLength());
}
Note, StringSearch is not to be subclassed.
The user can create a customized table-based collation.
For more information about the collation service see the User Guide.
Collation service provides correct sorting orders for most locales supported in ICU. If specific data for a locale is not available, the orders eventually falls back to the CLDR root sort order.
Sort ordering may be customized by providing your own set of rules. For more on this subject see the Collation Customization section of the User Guide.
Note, RuleBasedCollator is not to be subclassed.
| anonymous enum |
| anonymous enum |
Max index for stored interval patterns.
This API is for internal use only. ICU 4.4
Definition at line 372 of file dtitvinf.h.
| anonymous enum |
Selector for date formatting context.
| DT_CONTEXT_COUNT |
One more than the highest normal DtContextType value.
|
Definition at line 277 of file dtfmtsym.h.
Selector for date formatting width.
| SHORT |
Short width is currently only supported for weekday names.
|
| DT_WIDTH_COUNT |
One more than the highest normal DtWidthType value.
|
Definition at line 293 of file dtfmtsym.h.
Constants for capitalization context usage types.
Definition at line 605 of file dtfmtsym.h.
Somewhat temporary constants for leap month pattern types, adequate for supporting just leap month patterns as needed for Chinese lunar calendar.
Eventually we will add full support for different month pattern types (needed for other calendars such as Hindu) at which point this approach will be replaced by a more complete approach.
Definition at line 513 of file dtfmtsym.h.
| virtual icu::final::~CanonicalIterator | ( | ) | [virtual] |
Destructor Cleans pieces.
| icu::final::~Char16Ptr | ( | ) | [inline] |
Destructor.
| icu::final::~ConstChar16Ptr | ( | ) | [inline] |
Destructor.
Destructor.
Destructor.
| virtual icu::final::~UnicodeSet | ( | ) | [virtual] |
Destructs the set.
| virtual icu::final::~UnicodeSetIterator | ( | ) | [virtual] |
Destructor.
| virtual icu::final::~CollationElementIterator | ( | ) | [virtual] |
Destructor.
| virtual icu::final::~DateFormatSymbols | ( | ) | [virtual] |
| virtual icu::final::~DateIntervalInfo | ( | ) | [virtual] |
| virtual icu::final::~RegexPattern | ( | ) | [virtual] |
Destructor.
Note that a RegexPattern object must persist so long as any RegexMatcher objects that were created from the RegexPattern are active.
| virtual icu::final::~RegexMatcher | ( | ) | [virtual] |
Destructor.
| virtual icu::final::~StringSearch | ( | void | ) | [virtual] |
Destructor.
Cleans up the search iterator data struct. If a collator is created in the constructor, it will be destroyed here.
| virtual icu::final::~RuleBasedCollator | ( | ) | [virtual] |
Destructor.
| virtual UnicodeSet& icu::final::add | ( | UChar32 | start, |
| UChar32 | end | ||
| ) | [virtual] |
Adds the specified range to this set if it is not already present.
If this set already contains the specified range, the call leaves this set unchanged. If start > end then an empty range is added, leaving the set unchanged. This is equivalent to a boolean logic OR, or a set UNION. A frozen set will not be modified.
| start | first character, inclusive, of range to be added to this set. |
| end | last character, inclusive, of range to be added to this set. |
| UnicodeSet& icu::final::add | ( | UChar32 | c | ) |
Adds the specified character to this set if it is not already present.
If this set already contains the specified character, the call leaves this set unchanged. A frozen set will not be modified.
| c | the character (code point) |
| UnicodeSet& icu::final::add | ( | const UnicodeString & | s | ) |
Adds the specified multicharacter to this set if it is not already present.
If this set already contains the multicharacter, the call leaves this set unchanged. Thus "ch" => {"ch"} A frozen set will not be modified.
| s | the source string |
| UnicodeSet& icu::final::addAll | ( | const UnicodeString & | s | ) |
Adds each of the characters in this string to the set.
Note: "ch" => {"c", "h"} If this set already contains any particular character, it has no effect on that character. A frozen set will not be modified.
| s | the source string |
| virtual UnicodeSet& icu::final::addAll | ( | const UnicodeSet & | c | ) | [virtual] |
Adds all of the elements in the specified set to this set if they're not already present.
This operation effectively modifies this set so that its value is the union of the two sets. The behavior of this operation is unspecified if the specified collection is modified while the operation is in progress. A frozen set will not be modified.
| c | set whose elements are to be added to this set. |
| virtual void icu::final::addMatchSetTo | ( | UnicodeSet & | toUnionTo | ) | const [override, virtual] |
Implementation of UnicodeMatcher API.
Union the set of all characters that may be matched by this object into the given set.
| toUnionTo | the set into which to union the source characters |
Implements icu::UnicodeMatcher.
| void icu::final::addReplace | ( | int32_t | oldLength, |
| int32_t | newLength | ||
| ) |
Adds a change edit: a record for a text replacement/insertion/deletion.
Normally called from inside ICU string transformation functions, not user code.
| void icu::final::addUnchanged | ( | int32_t | unchangedLength | ) |
Adds a no-change edit: a record for an unchanged segment of text.
Normally called from inside ICU string transformation functions, not user code.
| virtual RegexMatcher& icu::final::appendReplacement | ( | UnicodeString & | dest, |
| const UnicodeString & | replacement, | ||
| UErrorCode & | status | ||
| ) | [virtual] |
Implements a replace operation intended to be used as part of an incremental find-and-replace.
The input string, starting from the end of the previous replacement and ending at the start of the current match, is appended to the destination string. Then the replacement string is appended to the output string, including handling any substitutions of captured text.
For simple, prepackaged, non-incremental find-and-replace operations, see replaceFirst() or replaceAll().
| dest | A UnicodeString to which the results of the find-and-replace are appended. |
| replacement | A UnicodeString that provides the text to be substituted for the input text that matched the regexp pattern. The replacement text may contain references to captured text from the input. |
| status | A reference to a UErrorCode to receive any errors. Possible errors are U_REGEX_INVALID_STATE if no match has been attempted or the last match failed, and U_INDEX_OUTOFBOUNDS_ERROR if the replacement text specifies a capture group that does not exist in the pattern. |
| virtual RegexMatcher& icu::final::appendReplacement | ( | UText * | dest, |
| UText * | replacement, | ||
| UErrorCode & | status | ||
| ) | [virtual] |
Implements a replace operation intended to be used as part of an incremental find-and-replace.
The input string, starting from the end of the previous replacement and ending at the start of the current match, is appended to the destination string. Then the replacement string is appended to the output string, including handling any substitutions of captured text.
For simple, prepackaged, non-incremental find-and-replace operations, see replaceFirst() or replaceAll().
| dest | A mutable UText to which the results of the find-and-replace are appended. Must not be nullptr. |
| replacement | A UText that provides the text to be substituted for the input text that matched the regexp pattern. The replacement text may contain references to captured text from the input. |
| status | A reference to a UErrorCode to receive any errors. Possible errors are U_REGEX_INVALID_STATE if no match has been attempted or the last match failed, and U_INDEX_OUTOFBOUNDS_ERROR if the replacement text specifies a capture group that does not exist in the pattern. |
| virtual UnicodeString& icu::final::appendTail | ( | UnicodeString & | dest | ) | [virtual] |
As the final step in a find-and-replace operation, append the remainder of the input string, starting at the position following the last appendReplacement(), to the destination string.
`appendTail()` is intended to be invoked after one or more invocations of the `RegexMatcher::appendReplacement()`.
| dest | A UnicodeString to which the results of the find-and-replace are appended. |
| virtual UText* icu::final::appendTail | ( | UText * | dest, |
| UErrorCode & | status | ||
| ) | [virtual] |
As the final step in a find-and-replace operation, append the remainder of the input string, starting at the position following the last appendReplacement(), to the destination string.
`appendTail()` is intended to be invoked after one or more invocations of the `RegexMatcher::appendReplacement()`.
| dest | A mutable UText to which the results of the find-and-replace are appended. Must not be nullptr. |
| status | error cod |
| UnicodeSet& icu::final::applyIntPropertyValue | ( | UProperty | prop, |
| int32_t | value, | ||
| UErrorCode & | ec | ||
| ) |
Modifies this set to contain those code points which have the given value for the given binary or enumerated property, as returned by u_getIntPropertyValue.
Prior contents of this set are lost. A frozen set will not be modified.
| prop | a property in the range UCHAR_BIN_START..UCHAR_BIN_LIMIT-1 or UCHAR_INT_START..UCHAR_INT_LIMIT-1 or UCHAR_MASK_START..UCHAR_MASK_LIMIT-1. |
| value | a value in the range u_getIntPropertyMinValue(prop).. u_getIntPropertyMaxValue(prop), with one exception. If prop is UCHAR_GENERAL_CATEGORY_MASK, then value should not be a UCharCategory, but rather a mask value produced by U_GET_GC_MASK(). This allows grouped categories such as [:L:] to be represented. |
| ec | error code input/output parameter |
| UBool icu::final::applyPattern | ( | const UnicodeString & | pattern, |
| UErrorCode & | errorCode | ||
| ) | [inline] |
Changes this object according to the new pattern.
| pattern | The pattern string. |
| errorCode | ICU error code in/out parameter. Must fulfill U_SUCCESS before the function call. Set to U_ILLEGAL_ARGUMENT_ERROR for bad argument syntax. |
Definition at line 131 of file simpleformatter.h.
References INT32_MAX.
| UnicodeSet& icu::final::applyPattern | ( | const UnicodeString & | pattern, |
| UErrorCode & | status | ||
| ) |
Modifies this set to represent the set specified by the given pattern, ignoring Unicode Pattern_White_Space characters.
See the class description for the syntax of the pattern language. A frozen set will not be modified.
| pattern | a string specifying what characters are in the set |
| status | returns U_ILLEGAL_ARGUMENT_ERROR if the pattern contains a syntax error. Empties the set passed before applying the pattern. |
| UnicodeSet& icu::final::applyPattern | ( | const UnicodeString & | pattern, |
| uint32_t | options, | ||
| const SymbolTable * | symbols, | ||
| UErrorCode & | status | ||
| ) |
Modifies this set to represent the set specified by the given pattern, optionally ignoring Unicode Pattern_White_Space characters.
See the class description for the syntax of the pattern language. A frozen set will not be modified.
| pattern | a string specifying what characters are in the set |
| options | bitmask for options to apply to the pattern. Valid options are USET_IGNORE_SPACE and at most one of USET_CASE_INSENSITIVE, USET_ADD_CASE_MAPPINGS, USET_SIMPLE_CASE_INSENSITIVE. These case options are mutually exclusive. |
| symbols | a symbol table mapping variable names to values and stand-ins to UnicodeSets; may be nullptr |
| status | returns U_ILLEGAL_ARGUMENT_ERROR if the pattern contains a syntax error. Empties the set passed before applying the pattern. |
| UnicodeSet& icu::final::applyPattern | ( | const UnicodeString & | pattern, |
| ParsePosition & | pos, | ||
| uint32_t | options, | ||
| const SymbolTable * | symbols, | ||
| UErrorCode & | status | ||
| ) |
Parses the given pattern, starting at the given position.
The character at pattern.charAt(pos.getIndex()) must be '[', or the parse fails. Parsing continues until the corresponding closing ']'. If a syntax error is encountered between the opening and closing brace, the parse fails. Upon return from a successful parse, the ParsePosition is updated to point to the character following the closing ']', and a StringBuffer containing a pairs list for the parsed pattern is returned. This method calls itself recursively to parse embedded subpatterns. Empties the set passed before applying the pattern. A frozen set will not be modified.
| pattern | the string containing the pattern to be parsed. The portion of the string from pos.getIndex(), which must be a '[', to the corresponding closing ']', is parsed. |
| pos | upon entry, the position at which to being parsing. The character at pattern.charAt(pos.getIndex()) must be a '['. Upon return from a successful parse, pos.getIndex() is either the character after the closing ']' of the parsed pattern, or pattern.length() if the closing ']' is the last character of the pattern string. |
| options | bitmask for options to apply to the pattern. Valid options are USET_IGNORE_SPACE and at most one of USET_CASE_INSENSITIVE, USET_ADD_CASE_MAPPINGS, USET_SIMPLE_CASE_INSENSITIVE. These case options are mutually exclusive. |
| symbols | a symbol table mapping variable names to values and stand-ins to UnicodeSets; may be nullptr |
| status | returns U_ILLEGAL_ARGUMENT_ERROR if the pattern contains a syntax error. |
| UBool icu::final::applyPatternMinMaxArguments | ( | const UnicodeString & | pattern, |
| int32_t | min, | ||
| int32_t | max, | ||
| UErrorCode & | errorCode | ||
| ) |
Changes this object according to the new pattern.
The number of arguments checked against the given limits is the highest argument number plus one, not the number of occurrences of arguments.
| pattern | The pattern string. |
| min | The pattern must have at least this many arguments. |
| max | The pattern must have at most this many arguments. |
| errorCode | ICU error code in/out parameter. Must fulfill U_SUCCESS before the function call. Set to U_ILLEGAL_ARGUMENT_ERROR for bad argument syntax and too few or too many arguments. |
| UnicodeSet& icu::final::applyPropertyAlias | ( | const UnicodeString & | prop, |
| const UnicodeString & | value, | ||
| UErrorCode & | ec | ||
| ) |
Modifies this set to contain those code points which have the given value for the given property.
Prior contents of this set are lost. A frozen set will not be modified.
| prop | a property alias, either short or long. The name is matched loosely. See PropertyAliases.txt for names and a description of loose matching. If the value string is empty, then this string is interpreted as either a General_Category value alias, a Script value alias, a binary property alias, or a special ID. Special IDs are matched loosely and correspond to the following sets: |
"ANY" = [\u0000-\U0010FFFF], "ASCII" = [\u0000-\u007F], "Assigned" = [:^Cn:].
| value | a value alias, either short or long. The name is matched loosely. See PropertyValueAliases.txt for names and a description of loose matching. In addition to aliases listed, numeric values and canonical combining classes may be expressed numerically, e.g., ("nv", "0.5") or ("ccc", "220"). The value string may also be empty. |
| ec | error code input/output parameter |
| icu::final::CanonicalIterator | ( | const UnicodeString & | source, |
| UErrorCode & | status | ||
| ) |
Construct a CanonicalIterator object.
| source | string to get results for |
| status | Fill-in parameter which receives the status of this operation. |
| icu::final::Char16Ptr | ( | char16_t * | p | ) | [inline] |
| icu::final::Char16Ptr | ( | uint16_t * | p | ) | [inline] |
| icu::final::Char16Ptr | ( | wchar_t * | p | ) | [inline] |
Converts the pointer to char16_t *.
(Only defined if U_SIZEOF_WCHAR_T==2.)
| p | pointer to be converted |
| icu::final::Char16Ptr | ( | std::nullptr_t | p | ) | [inline] |
| UChar32 icu::final::charAt | ( | int32_t | index | ) | const |
Returns the character at the given index within this set, where the set is ordered by ascending code point.
If the index is out of range for characters, returns (UChar32)-1. The inverse of this method is indexOf().
For iteration, this is slower than UnicodeSetIterator or getRangeCount()/getRangeStart()/getRangeEnd(), because for each call it skips linearly over index characters in the ranges.
| index | an index from 0..size()-1 |
| virtual UnicodeSet& icu::final::clear | ( | void | ) | [virtual] |
Removes all of the elements from this set.
This set will be empty after this call returns. A frozen set will not be modified.
| virtual RegexPattern* icu::final::clone | ( | ) | const [virtual] |
Create an exact copy of this RegexPattern object.
Since RegexPattern is not intended to be subclassed, clone() and the copy construction are equivalent operations.
Implements icu::UnicodeFilter.
| virtual DateIntervalInfo* icu::final::clone | ( | ) | const [virtual] |
Clone this object polymorphically.
The caller owns the result and should delete it when done.
Implements icu::UnicodeFilter.
| virtual RuleBasedCollator* icu::final::clone | ( | ) | const [override, virtual] |
Makes a copy of this object.
Implements icu::UnicodeFilter.
| StringSearch* icu::final::clone | ( | ) | const [virtual] |
Clone this object.
Clones can be used concurrently in multiple threads. If an error occurs, then nullptr is returned. The caller must delete the clone.
Implements icu::UnicodeFilter.
| virtual UnicodeSet* icu::final::clone | ( | ) | const [override, virtual] |
Returns a copy of this object.
All UnicodeFunctor objects have to support cloning in order to allow classes using UnicodeFunctors, such as Transliterator, to implement cloning. If this set is frozen, then the clone will be frozen as well. Use cloneAsThawed() for a mutable clone of a frozen set.
Implements icu::UnicodeFilter.
| UnicodeSet* icu::final::cloneAsThawed | ( | ) | const |
| int32_t icu::final::cloneBinary | ( | uint8_t * | buffer, |
| int32_t | capacity, | ||
| UErrorCode & | status | ||
| ) | const |
Creates a binary image of a collator.
This binary image can be stored and later used to instantiate a collator using ucol_openBinary. This API supports preflighting.
| buffer | a fill-in buffer to receive the binary image |
| capacity | capacity of the destination buffer |
| status | for catching errors |
| uint8_t* icu::final::cloneRuleData | ( | int32_t & | length, |
| UErrorCode & | status | ||
| ) | const |
Do not use this method: The caller and the ICU library might use different heaps.
Use cloneBinary() instead which writes to caller-provided memory.
Returns a binary format of this collator.
| length | Returns the length of the data, in bytes |
| status | the error code status. |
| UnicodeSet& icu::final::closeOver | ( | int32_t | attribute | ) |
Close this set over the given attribute.
For the attribute USET_CASE_INSENSITIVE, the result is to modify this set so that:
1. For each character or string 'a' in this set, all strings or characters 'b' such that foldCase(a) == foldCase(b) are added to this set.
2. For each string 'e' in the resulting set, if e != foldCase(e), 'e' will be removed.
Example: [aq\u00DF{Bc}{bC}{Fi}] => [aAqQ\u00DF\uFB01{ss}{bc}{fi}]
(Here foldCase(x) refers to the operation u_strFoldCase, and a == b denotes that the contents are the same, not pointer comparison.)
A frozen set will not be modified.
| attribute | bitmask for attributes to close over. Valid options: At most one of USET_CASE_INSENSITIVE, USET_ADD_CASE_MAPPINGS, USET_SIMPLE_CASE_INSENSITIVE. These case options are mutually exclusive. Unrelated options bits are ignored. |
| icu::final::CollationElementIterator | ( | const CollationElementIterator & | other | ) |
| virtual UnicodeSet& icu::final::compact | ( | ) | [virtual] |
Reallocate this objects internal structures to take up the least possible space, without changing this object's value.
A frozen set will not be modified.
| virtual UCollationResult icu::final::compare | ( | const UnicodeString & | source, |
| const UnicodeString & | target, | ||
| UErrorCode & | status | ||
| ) | const [override, virtual] |
The comparison function compares the character data stored in two different strings.
Returns information about whether a string is less than, greater than or equal to another string.
| source | the source string to be compared with. |
| target | the string that is to be compared with the source string. |
| status | possible error code |
Implements icu::Collator.
| virtual UCollationResult icu::final::compare | ( | const UnicodeString & | source, |
| const UnicodeString & | target, | ||
| int32_t | length, | ||
| UErrorCode & | status | ||
| ) | const [override, virtual] |
Does the same thing as compare but limits the comparison to a specified length.
| source | the source string to be compared with. |
| target | the string that is to be compared with the source string. |
| length | the length the comparison is limited to |
| status | possible error code |
Implements icu::Collator.
| virtual UCollationResult icu::final::compare | ( | const char16_t * | source, |
| int32_t | sourceLength, | ||
| const char16_t * | target, | ||
| int32_t | targetLength, | ||
| UErrorCode & | status | ||
| ) | const [override, virtual] |
The comparison function compares the character data stored in two different string arrays.
Returns information about whether a string array is less than, greater than or equal to another string array.
| source | the source string array to be compared with. |
| sourceLength | the length of the source string array. If this value is equal to -1, the string array is null-terminated. |
| target | the string that is to be compared with the source string. |
| targetLength | the length of the target string array. If this value is equal to -1, the string array is null-terminated. |
| status | possible error code |
Implements icu::Collator.
| virtual UCollationResult icu::final::compare | ( | UCharIterator & | sIter, |
| UCharIterator & | tIter, | ||
| UErrorCode & | status | ||
| ) | const [override, virtual] |
Compares two strings using the Collator.
Returns whether the first one compares less than/equal to/greater than the second one. This version takes UCharIterator input.
| sIter | the first ("source") string iterator |
| tIter | the second ("target") string iterator |
| status | ICU status |
Reimplemented from icu::Collator.
| virtual UCollationResult icu::final::compareUTF8 | ( | const StringPiece & | source, |
| const StringPiece & | target, | ||
| UErrorCode & | status | ||
| ) | const [override, virtual] |
Compares two UTF-8 strings using the Collator.
Returns whether the first one compares less than/equal to/greater than the second one. This version takes UTF-8 input. Note that a StringPiece can be implicitly constructed from a std::string or a NUL-terminated const char * string.
| source | the first UTF-8 string |
| target | the second UTF-8 string |
| status | ICU status |
Reimplemented from icu::Collator.
| static RegexPattern* icu::final::compile | ( | const UnicodeString & | regex, |
| UParseError & | pe, | ||
| UErrorCode & | status | ||
| ) | [static] |
Compiles the regular expression in string form into a RegexPattern object.
These compile methods, rather than the constructors, are the usual way that RegexPattern objects are created.
Note that RegexPattern objects must not be deleted while RegexMatcher objects created from the pattern are active. RegexMatchers keep a pointer back to their pattern, so premature deletion of the pattern is a catastrophic error.
All URegexpFlag pattern match mode flags are set to their default values.
Note that it is often more convenient to construct a RegexMatcher directly from a pattern string rather than separately compiling the pattern and then creating a RegexMatcher object from the pattern.
| regex | The regular expression to be compiled. |
| pe | Receives the position (line and column nubers) of any error within the regular expression.) |
| status | A reference to a UErrorCode to receive any errors. |
| static RegexPattern* icu::final::compile | ( | UText * | regex, |
| UParseError & | pe, | ||
| UErrorCode & | status | ||
| ) | [static] |
Compiles the regular expression in string form into a RegexPattern object.
These compile methods, rather than the constructors, are the usual way that RegexPattern objects are created.
Note that RegexPattern objects must not be deleted while RegexMatcher objects created from the pattern are active. RegexMatchers keep a pointer back to their pattern, so premature deletion of the pattern is a catastrophic error.
All URegexpFlag pattern match mode flags are set to their default values.
Note that it is often more convenient to construct a RegexMatcher directly from a pattern string rather than separately compiling the pattern and then creating a RegexMatcher object from the pattern.
| regex | The regular expression to be compiled. Note, the text referred to by this UText must not be deleted during the lifetime of the RegexPattern object or any RegexMatcher object created from it. |
| pe | Receives the position (line and column nubers) of any error within the regular expression.) |
| status | A reference to a UErrorCode to receive any errors. |
| static RegexPattern* icu::final::compile | ( | const UnicodeString & | regex, |
| uint32_t | flags, | ||
| UParseError & | pe, | ||
| UErrorCode & | status | ||
| ) | [static] |
Compiles the regular expression in string form into a RegexPattern object using the specified URegexpFlag match mode flags.
These compile methods, rather than the constructors, are the usual way that RegexPattern objects are created.
Note that RegexPattern objects must not be deleted while RegexMatcher objects created from the pattern are active. RegexMatchers keep a pointer back to their pattern, so premature deletion of the pattern is a catastrophic error.
Note that it is often more convenient to construct a RegexMatcher directly from a pattern string instead of than separately compiling the pattern and then creating a RegexMatcher object from the pattern.
| regex | The regular expression to be compiled. |
| flags | The URegexpFlag match mode flags to be used, e.g. UREGEX_CASE_INSENSITIVE. |
| pe | Receives the position (line and column numbers) of any error within the regular expression.) |
| status | A reference to a UErrorCode to receive any errors. |
| static RegexPattern* icu::final::compile | ( | UText * | regex, |
| uint32_t | flags, | ||
| UParseError & | pe, | ||
| UErrorCode & | status | ||
| ) | [static] |
Compiles the regular expression in string form into a RegexPattern object using the specified URegexpFlag match mode flags.
These compile methods, rather than the constructors, are the usual way that RegexPattern objects are created.
Note that RegexPattern objects must not be deleted while RegexMatcher objects created from the pattern are active. RegexMatchers keep a pointer back to their pattern, so premature deletion of the pattern is a catastrophic error.
Note that it is often more convenient to construct a RegexMatcher directly from a pattern string instead of than separately compiling the pattern and then creating a RegexMatcher object from the pattern.
| regex | The regular expression to be compiled. Note, the text referred to by this UText must not be deleted during the lifetime of the RegexPattern object or any RegexMatcher object created from it. |
| flags | The URegexpFlag match mode flags to be used, e.g. UREGEX_CASE_INSENSITIVE. |
| pe | Receives the position (line and column numbers) of any error within the regular expression.) |
| status | A reference to a UErrorCode to receive any errors. |
| static RegexPattern* icu::final::compile | ( | const UnicodeString & | regex, |
| uint32_t | flags, | ||
| UErrorCode & | status | ||
| ) | [static] |
Compiles the regular expression in string form into a RegexPattern object using the specified URegexpFlag match mode flags.
These compile methods, rather than the constructors, are the usual way that RegexPattern objects are created.
Note that RegexPattern objects must not be deleted while RegexMatcher objects created from the pattern are active. RegexMatchers keep a pointer back to their pattern, so premature deletion of the pattern is a catastrophic error.
Note that it is often more convenient to construct a RegexMatcher directly from a pattern string instead of than separately compiling the pattern and then creating a RegexMatcher object from the pattern.
| regex | The regular expression to be compiled. |
| flags | The URegexpFlag match mode flags to be used, e.g. UREGEX_CASE_INSENSITIVE. |
| status | A reference to a UErrorCode to receive any errors. |
| static RegexPattern* icu::final::compile | ( | UText * | regex, |
| uint32_t | flags, | ||
| UErrorCode & | status | ||
| ) | [static] |
Compiles the regular expression in string form into a RegexPattern object using the specified URegexpFlag match mode flags.
These compile methods, rather than the constructors, are the usual way that RegexPattern objects are created.
Note that RegexPattern objects must not be deleted while RegexMatcher objects created from the pattern are active. RegexMatchers keep a pointer back to their pattern, so premature deletion of the pattern is a catastrophic error.
Note that it is often more convenient to construct a RegexMatcher directly from a pattern string instead of than separately compiling the pattern and then creating a RegexMatcher object from the pattern.
| regex | The regular expression to be compiled. Note, the text referred to by this UText must not be deleted during the lifetime of the RegexPattern object or any RegexMatcher object created from it. |
| flags | The URegexpFlag match mode flags to be used, e.g. UREGEX_CASE_INSENSITIVE. |
| status | A reference to a UErrorCode to receive any errors. |
| virtual UnicodeSet& icu::final::complement | ( | ) | [virtual] |
This is equivalent to complement(MIN_VALUE, MAX_VALUE).
Note: This performs a symmetric difference with all code points and thus retains all multicharacter strings. In order to achieve a “code point complement” (all code points minus this set), the easiest is to .complement().removeAllStrings().
A frozen set will not be modified.
| virtual UnicodeSet& icu::final::complement | ( | UChar32 | start, |
| UChar32 | end | ||
| ) | [virtual] |
Complements the specified range in this set.
Any character in the range will be removed if it is in this set, or will be added if it is not in this set. If start > end then an empty range is complemented, leaving the set unchanged. This is equivalent to a boolean logic XOR. A frozen set will not be modified.
| start | first character, inclusive, of range |
| end | last character, inclusive, of range |
Complements the specified character in this set.
The character will be removed if it is in this set, or will be added if it is not in this set. A frozen set will not be modified.
| c | the character (code point) |
| UnicodeSet& icu::final::complement | ( | const UnicodeString & | s | ) |
Complement the specified string in this set.
The string will be removed if it is in this set, or will be added if it is not in this set. A frozen set will not be modified.
| s | the string to complement |
| UnicodeSet& icu::final::complementAll | ( | const UnicodeString & | s | ) |
Complement EACH of the characters in this string.
Note: "ch" == {"c", "h"} A frozen set will not be modified.
| s | the source string |
| virtual UnicodeSet& icu::final::complementAll | ( | const UnicodeSet & | c | ) | [virtual] |
Complements in this set all elements contained in the specified set.
Any character in the other set will be removed if it is in this set, or will be added if it is not in this set. A frozen set will not be modified.
| c | set that defines which elements will be xor'ed from this set. |
| icu::final::ConstChar16Ptr | ( | const char16_t * | p | ) | [inline] |
| icu::final::ConstChar16Ptr | ( | const uint16_t * | p | ) | [inline] |
| icu::final::ConstChar16Ptr | ( | const wchar_t * | p | ) | [inline] |
Converts the pointer to char16_t *.
(Only defined if U_SIZEOF_WCHAR_T==2.)
| p | pointer to be converted |
| icu::final::ConstChar16Ptr | ( | const std::nullptr_t | p | ) | [inline] |
| virtual UBool icu::final::contains | ( | UChar32 | c | ) | const [override, virtual] |
Returns true if this set contains the given character.
This function works faster with a frozen set.
| c | character to be checked for containment |
Implements icu::UnicodeFilter.
| virtual UBool icu::final::contains | ( | UChar32 | start, |
| UChar32 | end | ||
| ) | const [virtual] |
Returns true if this set contains every character of the given range.
| start | first character, inclusive, of the range |
| end | last character, inclusive, of the range |
| UBool icu::final::contains | ( | const UnicodeString & | s | ) | const |
Returns true if this set contains the given multicharacter string.
| s | string to be checked for containment |
true if this set contains the specified string | virtual UBool icu::final::containsAll | ( | const UnicodeSet & | c | ) | const [virtual] |
Returns true if this set contains all the characters and strings of the given set.
| c | set to be checked for containment |
| UBool icu::final::containsAll | ( | const UnicodeString & | s | ) | const |
Returns true if this set contains all the characters of the given string.
| s | string containing characters to be checked for containment |
| UBool icu::final::containsNone | ( | UChar32 | start, |
| UChar32 | end | ||
| ) | const |
Returns true if this set contains none of the characters of the given range.
| start | first character, inclusive, of the range |
| end | last character, inclusive, of the range |
| UBool icu::final::containsNone | ( | const UnicodeSet & | c | ) | const |
Returns true if this set contains none of the characters and strings of the given set.
| c | set to be checked for containment |
| UBool icu::final::containsNone | ( | const UnicodeString & | s | ) | const |
Returns true if this set contains none of the characters of the given string.
| s | string containing characters to be checked for containment |
| UBool icu::final::containsSome | ( | UChar32 | start, |
| UChar32 | end | ||
| ) | const [inline] |
Returns true if this set contains one or more of the characters in the given range.
| start | first character, inclusive, of the range |
| end | last character, inclusive, of the range |
| UBool icu::final::containsSome | ( | const UnicodeSet & | s | ) | const [inline] |
Returns true if this set contains one or more of the characters and strings of the given set.
| s | The set to be checked for containment |
| UBool icu::final::containsSome | ( | const UnicodeString & | s | ) | const [inline] |
Returns true if this set contains one or more of the characters of the given string.
| s | string containing characters to be checked for containment |
| UBool icu::final::copyErrorTo | ( | UErrorCode & | outErrorCode | ) | const |
Sets the UErrorCode if an error occurred while recording edits.
Preserves older error codes in the outErrorCode. Normally called from inside ICU string transformation functions, not user code.
| outErrorCode | Set to an error code if it does not contain one already and an error occurred while recording edits. Otherwise unchanged. |
| virtual CollationElementIterator* icu::final::createCollationElementIterator | ( | const UnicodeString & | source | ) | const [virtual] |
Creates a collation element iterator for the source string.
The caller of this method is responsible for the memory management of the return pointer.
| source | the string over which the CollationElementIterator will iterate. |
| virtual CollationElementIterator* icu::final::createCollationElementIterator | ( | const CharacterIterator & | source | ) | const [virtual] |
Creates a collation element iterator for the source.
The caller of this method is responsible for the memory management of the returned pointer.
| source | the CharacterIterator which produces the characters over which the CollationElementItgerator will iterate. |
| static DateFormatSymbols* icu::final::createForLocale | ( | const Locale & | locale, |
| UErrorCode & | status | ||
| ) | [static] |
Gets a DateFormatSymbols by locale.
Unlike the constructors which always use gregorian calendar, this method uses the calendar in the locale. If the locale contains no explicit calendar, this method uses the default calendar for that locale.
| locale | the locale. |
| status | error returned here. |
| static UnicodeSet* icu::final::createFrom | ( | const UnicodeString & | s | ) | [static] |
Makes a set from a multicharacter string.
Thus "ch" => {"ch"}
| s | the source string |
| static UnicodeSet* icu::final::createFromAll | ( | const UnicodeString & | s | ) | [static] |
Makes a set from each of the characters in the string.
Thus "ch" => {"c", "h"}
| s | the source string |
| icu::final::DateFormatSymbols | ( | UErrorCode & | status | ) |
Construct a DateFormatSymbols object by loading format data from resources for the default locale, in the default calendar (Gregorian).
NOTE: This constructor will never fail; if it cannot get resource data for the default locale, it will return a last-resort object based on hard-coded strings.
| status | Status code. Failure results if the resources for the default cannot be found or cannot be loaded |
| icu::final::DateFormatSymbols | ( | const Locale & | locale, |
| UErrorCode & | status | ||
| ) |
Construct a DateFormatSymbols object by loading format data from resources for the given locale, in the default calendar (Gregorian).
| locale | Locale to load format data from. |
| status | Status code. Failure results if the resources for the locale cannot be found or cannot be loaded |
| icu::final::DateFormatSymbols | ( | const char * | type, |
| UErrorCode & | status | ||
| ) |
Construct a DateFormatSymbols object by loading format data from resources for the default locale, in the default calendar (Gregorian).
NOTE: This constructor will never fail; if it cannot get resource data for the default locale, it will return a last-resort object based on hard-coded strings.
| type | Type of calendar (as returned by Calendar::getType). Will be used to access the correct set of strings. (nullptr or empty string defaults to "gregorian".) |
| status | Status code. Failure results if the resources for the default cannot be found or cannot be loaded |
| icu::final::DateFormatSymbols | ( | const Locale & | locale, |
| const char * | type, | ||
| UErrorCode & | status | ||
| ) |
Construct a DateFormatSymbols object by loading format data from resources for the given locale, in the default calendar (Gregorian).
| locale | Locale to load format data from. |
| type | Type of calendar (as returned by Calendar::getType). Will be used to access the correct set of strings. (nullptr or empty string defaults to "gregorian".) |
| status | Status code. Failure results if the resources for the locale cannot be found or cannot be loaded |
| icu::final::DateFormatSymbols | ( | const DateFormatSymbols & | ) |
Copy constructor.
| icu::final::DateIntervalInfo | ( | UErrorCode & | status | ) |
Default constructor.
It does not initialize any interval patterns except that it initialize default fall-back pattern as "{0} - {1}", which can be reset by setFallbackIntervalPattern(). It should be followed by setFallbackIntervalPattern() and setIntervalPattern(), and is recommended to be used only for power users who wants to create their own interval patterns and use them to create date interval formatter.
| status | output param set to success/failure code on exit |
| icu::final::DateIntervalInfo | ( | const Locale & | locale, |
| UErrorCode & | status | ||
| ) |
Construct DateIntervalInfo for the given locale,.
| locale | the interval patterns are loaded from the appropriate calendar data (specified calendar or default calendar) in this locale. |
| status | output param set to success/failure code on exit |
| icu::final::DateIntervalInfo | ( | const DateIntervalInfo & | ) |
Copy constructor.
| void icu::final::dumpPattern | ( | ) | const |
Dump a compiled pattern.
Internal debug function.
| icu::final::Edits | ( | ) | [inline] |
| icu::final::Edits | ( | const Edits & | other | ) | [inline] |
| icu::final::Edits | ( | Edits && | src | ) | [inline] |
| virtual int32_t icu::final::end | ( | UErrorCode & | status | ) | const [virtual] |
Returns the index in the input string of the first character following the text matched during the previous match operation.
| status | A reference to a UErrorCode to receive any errors. Possible errors are U_REGEX_INVALID_STATE if no match has been attempted or the last match failed. |
| virtual int32_t icu::final::end | ( | int32_t | group, |
| UErrorCode & | status | ||
| ) | const [virtual] |
Returns the index in the input string of the character following the text matched by the specified capture group during the previous match operation.
| group | the capture group number |
| status | A reference to a UErrorCode to receive any errors. Possible errors are U_REGEX_INVALID_STATE if no match has been attempted or the last match failed and U_INDEX_OUTOFBOUNDS_ERROR for a bad capture group number |
| virtual int64_t icu::final::end64 | ( | UErrorCode & | status | ) | const [virtual] |
Returns the index in the input string of the first character following the text matched during the previous match operation.
| status | A reference to a UErrorCode to receive any errors. Possible errors are U_REGEX_INVALID_STATE if no match has been attempted or the last match failed. |
| virtual int64_t icu::final::end64 | ( | int32_t | group, |
| UErrorCode & | status | ||
| ) | const [virtual] |
Returns the index in the input string of the character following the text matched by the specified capture group during the previous match operation.
| group | the capture group number |
| status | A reference to a UErrorCode to receive any errors. Possible errors are U_REGEX_INVALID_STATE if no match has been attempted or the last match failed and U_INDEX_OUTOFBOUNDS_ERROR for a bad capture group number |
| virtual UBool icu::final::find | ( | ) | [virtual] |
Find the next pattern match in the input string.
The find begins searching the input at the location following the end of the previous match, or at the start of the string if there is no previous match. If a match is found, `start()`, `end()` and `group()` will provide more information regarding the match. Note that if the input string is changed by the application, use find(startPos, status) instead of find(), because the saved starting position may not be valid with the altered input string.
| virtual UBool icu::final::find | ( | UErrorCode & | status | ) | [virtual] |
Find the next pattern match in the input string.
The find begins searching the input at the location following the end of the previous match, or at the start of the string if there is no previous match. If a match is found, `start()`, `end()` and `group()` will provide more information regarding the match.
Note that if the input string is changed by the application, use find(startPos, status) instead of find(), because the saved starting position may not be valid with the altered input string.
| status | A reference to a UErrorCode to receive any errors. |
| virtual UBool icu::final::find | ( | int64_t | start, |
| UErrorCode & | status | ||
| ) | [virtual] |
Resets this RegexMatcher and then attempts to find the next substring of the input string that matches the pattern, starting at the specified index.
| start | The (native) index in the input string to begin the search. |
| status | A reference to a UErrorCode to receive any errors. |
| virtual uint32_t icu::final::flags | ( | ) | const [virtual] |
Get the URegexpFlag match mode flags that were used when compiling this pattern.
| static int32_t icu::final::fold | ( | uint32_t | options, |
| const char16_t * | src, | ||
| int32_t | srcLength, | ||
| char16_t * | dest, | ||
| int32_t | destCapacity, | ||
| Edits * | edits, | ||
| UErrorCode & | errorCode | ||
| ) | [static] |
Case-folds a UTF-16 string and optionally records edits.
Case folding is locale-independent and not context-sensitive, but there is an option for whether to include or exclude mappings for dotted I and dotless i that are marked with 'T' in CaseFolding.txt.
The result may be longer or shorter than the original. The source string and the destination buffer must not overlap.
| options | Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT, U_EDITS_NO_RESET, U_FOLD_CASE_DEFAULT, U_FOLD_CASE_EXCLUDE_SPECIAL_I. |
| src | The original string. |
| srcLength | The length of the original string. If -1, then src must be NUL-terminated. |
| dest | A buffer for the result string. The result will be NUL-terminated if the buffer is large enough. The contents is undefined in case of failure. |
| destCapacity | The size of the buffer (number of char16_ts). If it is 0, then dest may be nullptr and the function will only return the length of the result without writing any of the result string. |
| edits | Records edits for index mapping, working with styled text, and getting only changes (if any). The Edits contents is undefined if any error occurs. This function calls edits->reset() first unless options includes U_EDITS_NO_RESET. edits can be nullptr. |
| errorCode | Reference to an in/out error code value which must not indicate a failure before the function call. |
| UnicodeString& icu::final::format | ( | const UnicodeString & | value0, |
| UnicodeString & | appendTo, | ||
| UErrorCode & | errorCode | ||
| ) | const |
Formats the given value, appending to the appendTo builder.
The argument value must not be the same object as appendTo. getArgumentLimit() must be at most 1.
| value0 | Value for argument {0}. |
| appendTo | Gets the formatted pattern and value appended. |
| errorCode | ICU error code in/out parameter. Must fulfill U_SUCCESS before the function call. |
| UnicodeString& icu::final::format | ( | const UnicodeString & | value0, |
| const UnicodeString & | value1, | ||
| UnicodeString & | appendTo, | ||
| UErrorCode & | errorCode | ||
| ) | const |
Formats the given values, appending to the appendTo builder.
An argument value must not be the same object as appendTo. getArgumentLimit() must be at most 2.
| value0 | Value for argument {0}. |
| value1 | Value for argument {1}. |
| appendTo | Gets the formatted pattern and values appended. |
| errorCode | ICU error code in/out parameter. Must fulfill U_SUCCESS before the function call. |
| UnicodeString& icu::final::format | ( | const UnicodeString & | value0, |
| const UnicodeString & | value1, | ||
| const UnicodeString & | value2, | ||
| UnicodeString & | appendTo, | ||
| UErrorCode & | errorCode | ||
| ) | const |
Formats the given values, appending to the appendTo builder.
An argument value must not be the same object as appendTo. getArgumentLimit() must be at most 3.
| value0 | Value for argument {0}. |
| value1 | Value for argument {1}. |
| value2 | Value for argument {2}. |
| appendTo | Gets the formatted pattern and values appended. |
| errorCode | ICU error code in/out parameter. Must fulfill U_SUCCESS before the function call. |
| UnicodeString& icu::final::formatAndAppend | ( | const UnicodeString *const * | values, |
| int32_t | valuesLength, | ||
| UnicodeString & | appendTo, | ||
| int32_t * | offsets, | ||
| int32_t | offsetsLength, | ||
| UErrorCode & | errorCode | ||
| ) | const |
Formats the given values, appending to the appendTo string.
| values | The argument values. An argument value must not be the same object as appendTo. Can be nullptr if valuesLength==getArgumentLimit()==0. |
| valuesLength | The length of the values array. Must be at least getArgumentLimit(). |
| appendTo | Gets the formatted pattern and values appended. |
| offsets | offsets[i] receives the offset of where values[i] replaced pattern argument {i}. Can be shorter or longer than values. Can be nullptr if offsetsLength==0. If there is no {i} in the pattern, then offsets[i] is set to -1. |
| offsetsLength | The length of the offsets array. |
| errorCode | ICU error code in/out parameter. Must fulfill U_SUCCESS before the function call. |
| UnicodeString& icu::final::formatAndReplace | ( | const UnicodeString *const * | values, |
| int32_t | valuesLength, | ||
| UnicodeString & | result, | ||
| int32_t * | offsets, | ||
| int32_t | offsetsLength, | ||
| UErrorCode & | errorCode | ||
| ) | const |
Formats the given values, replacing the contents of the result string.
May optimize by actually appending to the result if it is the same object as the value corresponding to the initial argument in the pattern.
| values | The argument values. An argument value may be the same object as result. Can be nullptr if valuesLength==getArgumentLimit()==0. |
| valuesLength | The length of the values array. Must be at least getArgumentLimit(). |
| result | Gets its contents replaced by the formatted pattern and values. |
| offsets | offsets[i] receives the offset of where values[i] replaced pattern argument {i}. Can be shorter or longer than values. Can be nullptr if offsetsLength==0. If there is no {i} in the pattern, then offsets[i] is set to -1. |
| offsetsLength | The length of the offsets array. |
| errorCode | ICU error code in/out parameter. Must fulfill U_SUCCESS before the function call. |
Freeze the set (make it immutable).
Once frozen, it cannot be unfrozen and is therefore thread-safe until it is deleted. See the ICU4J Freezable interface for details. Freezing the set may also make some operations faster, for example contains() and span(). A frozen set will not be modified. (It remains frozen.)
| static CollationElementIterator* icu::final::fromUCollationElements | ( | UCollationElements * | uc | ) | [inline, static] |
| static const CollationElementIterator* icu::final::fromUCollationElements | ( | const UCollationElements * | uc | ) | [inline, static] |
| static UnicodeSet* icu::final::fromUSet | ( | USet * | uset | ) | [inline, static] |
Get a UnicodeSet pointer from a USet.
| uset | a USet (the ICU plain C type for UnicodeSet) |
| static const UnicodeSet* icu::final::fromUSet | ( | const USet * | uset | ) | [inline, static] |
Get a UnicodeSet pointer from a const USet.
| uset | a const USet (the ICU plain C type for UnicodeSet) |
| char16_t* icu::final::get | ( | ) | const [inline] |
| const char16_t* icu::final::get | ( | ) | const [inline] |
| const UnicodeString* icu::final::getAmPmStrings | ( | int32_t & | count | ) | const |
Gets AM/PM strings.
For example: "AM" and "PM".
| count | Filled in with length of the array. |
| int32_t icu::final::getArgumentLimit | ( | ) | const [inline] |
Definition at line 157 of file simpleformatter.h.
| virtual UColAttributeValue icu::final::getAttribute | ( | UColAttribute | attr, |
| UErrorCode & | status | ||
| ) | const [override, virtual] |
Universal attribute getter.
| attr | attribute type |
| status | to indicate whether the operation went on smoothly or there were errors |
Implements icu::Collator.
| Iterator icu::final::getCoarseChangesIterator | ( | ) | const [inline] |
| Iterator icu::final::getCoarseIterator | ( | ) | const [inline] |
Returns an Iterator for coarse-grained change and no-change edits (adjacent change edits are treated as one).
Can be used to perform simple string updates. Adjacent change edits are treated as one edit.
| UChar32 icu::final::getCodepoint | ( | ) | const [inline] |
Returns the current code point, if isString() returned false.
Otherwise returns an undefined result.
| UChar32 icu::final::getCodepointEnd | ( | ) | const [inline] |
Returns the end of the current code point range, if isString() returned false and nextRange() was called.
Otherwise returns an undefined result.
| virtual CollationKey& icu::final::getCollationKey | ( | const UnicodeString & | source, |
| CollationKey & | key, | ||
| UErrorCode & | status | ||
| ) | const [override, virtual] |
Transforms the string into a series of characters that can be compared with CollationKey.compare().
Note that sort keys are often less efficient than simply doing comparison. For more details, see the ICU User Guide.
| source | the source string. |
| key | the transformed key of the source string. |
| status | the error code status. |
Implements icu::Collator.
| virtual CollationKey& icu::final::getCollationKey | ( | const char16_t * | source, |
| int32_t | sourceLength, | ||
| CollationKey & | key, | ||
| UErrorCode & | status | ||
| ) | const [override, virtual] |
Transforms a specified region of the string into a series of characters that can be compared with CollationKey.compare.
Note that sort keys are often less efficient than simply doing comparison. For more details, see the ICU User Guide.
| source | the source string. |
| sourceLength | the length of the source string. |
| key | the transformed key of the source string. |
| status | the error code status. |
Implements icu::Collator.
| RuleBasedCollator* icu::final::getCollator | ( | ) | const |
Gets the collator used for the language rules.
Caller may modify but must not delete the RuleBasedCollator! Modifications to this collator will affect the original collator passed in to the StringSearch> constructor or to setCollator, if any.
| UBool icu::final::getDefaultOrder | ( | ) | const |
Get default order -- whether the first date in pattern is later date or not.
return default date ordering in interval pattern. true if the first date in pattern is later date, false otherwise.
| virtual UClassID icu::final::getDynamicClassID | ( | ) | const [override, virtual] |
ICU "poor man's RTTI", returns a UClassID for the actual class.
Reimplemented from icu::UObject.
| virtual UClassID icu::final::getDynamicClassID | ( | ) | const [override, virtual] |
ICU "poor man's RTTI", returns a UClassID for the actual class.
Reimplemented from icu::UObject.
| virtual UClassID icu::final::getDynamicClassID | ( | ) | const [override, virtual] |
ICU "poor man's RTTI", returns a UClassID for the actual class.
Reimplemented from icu::UObject.
| virtual UClassID icu::final::getDynamicClassID | ( | ) | const [override, virtual] |
ICU "poor man's RTTI", returns a UClassID for the actual class.
Reimplemented from icu::UObject.
| virtual UClassID icu::final::getDynamicClassID | ( | ) | const [override, virtual] |
ICU "poor man's RTTI", returns a UClassID for the actual class.
Reimplemented from icu::UObject.
| virtual UClassID icu::final::getDynamicClassID | ( | void | ) | const [override, virtual] |
Returns a unique class ID POLYMORPHICALLY.
Pure virtual override. This method is to implement a simple version of RTTI, since not all C++ compilers support genuine RTTI. Polymorphic operator==() and clone() methods call this method.
Reimplemented from icu::UObject.
| virtual UClassID icu::final::getDynamicClassID | ( | ) | const [override, virtual] |
ICU "poor man's RTTI", returns a UClassID for the actual class.
Reimplemented from icu::UObject.
| virtual UClassID icu::final::getDynamicClassID | ( | ) | const [override, virtual] |
ICU "poor man's RTTI", returns a UClassID for the actual class.
Reimplemented from icu::UObject.
| virtual UClassID icu::final::getDynamicClassID | ( | void | ) | const [override, virtual] |
Implement UnicodeFunctor API.
Reimplemented from icu::UObject.
| virtual UClassID icu::final::getDynamicClassID | ( | ) | const [override, virtual] |
ICU "poor man's RTTI", returns a UClassID for the actual class.
Reimplemented from icu::UObject.
| const UnicodeString* icu::final::getEraNames | ( | int32_t & | count | ) | const |
Gets era name strings.
For example: "Anno Domini" and "Before Christ".
| count | Filled in with length of the array. |
| const UnicodeString* icu::final::getEras | ( | int32_t & | count | ) | const |
Gets abbreviated era strings.
For example: "AD" and "BC".
| count | Filled in with length of the array. |
| UnicodeString& icu::final::getFallbackIntervalPattern | ( | UnicodeString & | result | ) | const |
Get the fallback interval pattern.
| result | output param to receive the pattern |
| virtual void icu::final::getFindProgressCallback | ( | URegexFindProgressCallback *& | callback, |
| const void *& | context, | ||
| UErrorCode & | status | ||
| ) | [virtual] |
Get the find progress callback function for this URegularExpression.
| callback | Out parameter, receives a pointer to the user-supplied callback function. |
| context | Out parameter, receives the user context pointer that was set when uregex_setFindProgressCallback() was called. |
| status | A reference to a UErrorCode to receive any errors. |
| Iterator icu::final::getFineChangesIterator | ( | ) | const [inline] |
| Iterator icu::final::getFineIterator | ( | ) | const [inline] |
| virtual UText* icu::final::getInput | ( | UText * | dest, |
| UErrorCode & | status | ||
| ) | const [virtual] |
Returns the input string being matched, either by copying it into the provided UText parameter or by returning a shallow clone of the live input.
Note that copying the entire input may cause significant performance and memory issues.
| dest | The UText into which the input should be copied, or nullptr to create a new UText |
| status | error code |
| UnicodeString& icu::final::getIntervalPattern | ( | const UnicodeString & | skeleton, |
| UCalendarDateFields | field, | ||
| UnicodeString & | result, | ||
| UErrorCode & | status | ||
| ) | const |
Get the interval pattern given skeleton and the largest different calendar field.
| skeleton | the skeleton |
| field | the largest different calendar field |
| result | output param to receive the pattern |
| status | output param set to success/failure code on exit |
| const UnicodeString* icu::final::getLeapMonthPatterns | ( | int32_t & | count | ) | const |
Somewhat temporary function for getting complete set of leap month patterns for all contexts & widths, indexed by EMonthPatternType values.
Returns nullptr if calendar does not have leap month patterns. Note, there is currently no setter for this. Eventually we will add full support for different month pattern types (needed for other calendars such as Hindu) at which point this approach will be replaced by a more complete approach.
| count | Filled in with length of the array (may be 0). |
| virtual Locale icu::final::getLocale | ( | ULocDataLocaleType | type, |
| UErrorCode & | status | ||
| ) | const [override, virtual] |
Gets the locale of the Collator.
| type | can be either requested, valid or actual locale. For more information see the definition of ULocDataLocaleType in uloc.h |
| status | the error code status. |
Implements icu::Collator.
| Locale icu::final::getLocale | ( | ULocDataLocaleType | type, |
| UErrorCode & | status | ||
| ) | const [virtual] |
Returns the locale for this object.
Two flavors are available: valid and actual locale.
Implements icu::Collator.
| UnicodeString& icu::final::getLocalPatternChars | ( | UnicodeString & | result | ) | const |
Gets localized date-time pattern characters.
For example: 'u', 't', etc.
Note: ICU no longer provides localized date-time pattern characters for a locale starting ICU 3.8. This method returns the non-localized date-time pattern characters unless user defined localized data is set by setLocalPatternChars.
| result | Output param which will receive the localized date-time pattern characters. |
| virtual void icu::final::getMatchCallback | ( | URegexMatchCallback *& | callback, |
| const void *& | context, | ||
| UErrorCode & | status | ||
| ) | [virtual] |
Get the callback function for this URegularExpression.
| callback | Out parameter, receives a pointer to the user-supplied callback function. |
| context | Out parameter, receives the user context pointer that was set when uregex_setMatchCallback() was called. |
| status | A reference to a UErrorCode to receive any errors. |
| int32_t icu::final::getMaxExpansion | ( | int32_t | order | ) | const |
Return the maximum length of any expansion sequences that end with the specified comparison order.
| order | a collation order returned by previous or next. |
| int32_t icu::final::getMaxExpansion | ( | int32_t | order | ) | const |
Returns the maximum length of any expansion sequences that end with the specified comparison order.
This is specific to the kind of collation element values and sequences returned by the CollationElementIterator. Call CollationElementIterator::getMaxExpansion() instead.
| order | a collation order returned by CollationElementIterator::previous or CollationElementIterator::next. |
| virtual UColReorderCode icu::final::getMaxVariable | ( | ) | const [override, virtual] |
Returns the maximum reordering group whose characters are affected by UCOL_ALTERNATE_HANDLING.
Reimplemented from icu::Collator.
| const UnicodeString* icu::final::getMonths | ( | int32_t & | count | ) | const |
Gets month strings.
For example: "January", "February", etc.
| count | Filled in with length of the array. |
| const UnicodeString* icu::final::getMonths | ( | int32_t & | count, |
| DtContextType | context, | ||
| DtWidthType | width | ||
| ) | const |
Gets month strings by width and context.
For example: "January", "February", etc.
| count | Filled in with length of the array. |
| context | The formatting context, either FORMAT or STANDALONE |
| width | The width of returned strings, either WIDE, ABBREVIATED, or NARROW. |
| const UnicodeString* icu::final::getNarrowEras | ( | int32_t & | count | ) | const |
Gets narrow era strings.
For example: "A" and "B".
| count | Filled in with length of the array. |
| int32_t icu::final::getOffset | ( | void | ) | const [virtual] |
Gets the offset of the currently processed character in the source string.
Implements icu::SearchIterator.
| virtual int32_t icu::final::getOffset | ( | void | ) | const [override, virtual] |
Return the current index in the text being searched.
If the iteration has gone past the end of the text (or past the beginning for a backwards search), USEARCH_DONE is returned.
Implements icu::SearchIterator.
| const UnicodeString& icu::final::getPattern | ( | ) | const |
| static const char16_t* icu::final::getPatternUChars | ( | void | ) | [static] |
Get the non-localized date-time pattern characters.
| const UnicodeString* icu::final::getQuarters | ( | int32_t & | count, |
| DtContextType | context, | ||
| DtWidthType | width | ||
| ) | const |
Gets quarter strings by width and context.
For example: "1st Quarter", "2nd Quarter", etc.
| count | Filled in with length of the array. |
| context | The formatting context, either FORMAT or STANDALONE |
| width | The width of returned strings, either WIDE, ABBREVIATED, or NARROW. |
| virtual int32_t icu::final::getRangeCount | ( | void | ) | const [virtual] |
Iteration method that returns the number of ranges contained in this set.
| virtual UChar32 icu::final::getRangeEnd | ( | int32_t | index | ) | const [virtual] |
Iteration method that returns the last character in the specified range of this set.
| virtual UChar32 icu::final::getRangeStart | ( | int32_t | index | ) | const [virtual] |
Iteration method that returns the first character in the specified range of this set.
| virtual int32_t icu::final::getReorderCodes | ( | int32_t * | dest, |
| int32_t | destCapacity, | ||
| UErrorCode & | status | ||
| ) | const [override, virtual] |
Retrieves the reordering codes for this collator.
| dest | The array to fill with the script ordering. |
| destCapacity | The length of dest. If it is 0, then dest may be nullptr and the function will only return the length of the result without writing any codes (pre-flighting). |
| status | A reference to an error code value, which must not indicate a failure before the function call. |
Reimplemented from icu::Collator.
| const UnicodeString& icu::final::getRules | ( | ) | const |
Gets the tailoring rules for this collator.
| void icu::final::getRules | ( | UColRuleOption | delta, |
| UnicodeString & | buffer | ||
| ) | const |
Returns current rules.
Delta defines whether full rules are returned or just the tailoring.
getRules(void) should normally be used instead. See https://unicode-org.github.io/icu/userguide/collation/customization#building-on-existing-locales
| delta | one of UCOL_TAILORING_ONLY, UCOL_FULL_RULES. |
| buffer | UnicodeString to store the result rules |
| const UnicodeString* icu::final::getShortMonths | ( | int32_t & | count | ) | const |
Gets short month strings.
For example: "Jan", "Feb", etc.
| count | Filled in with length of the array. |
| const UnicodeString* icu::final::getShortWeekdays | ( | int32_t & | count | ) | const |
Gets abbreviated weekday strings.
For example: "Sun", "Mon", etc. (Note: The method name is misleading; it does not get the CLDR-style "short" weekday strings, e.g. "Su", "Mo", etc.)
| count | Filled in with length of the array. |
| virtual int32_t icu::final::getSortKey | ( | const UnicodeString & | source, |
| uint8_t * | result, | ||
| int32_t | resultLength | ||
| ) | const [override, virtual] |
Get the sort key as an array of bytes from a UnicodeString.
Note that sort keys are often less efficient than simply doing comparison. For more details, see the ICU User Guide.
| source | string to be processed. |
| result | buffer to store result in. If nullptr, number of bytes needed will be returned. |
| resultLength | length of the result buffer. If if not enough the buffer will be filled to capacity. |
Implements icu::Collator.
| virtual int32_t icu::final::getSortKey | ( | const char16_t * | source, |
| int32_t | sourceLength, | ||
| uint8_t * | result, | ||
| int32_t | resultLength | ||
| ) | const [override, virtual] |
Get the sort key as an array of bytes from a char16_t buffer.
Note that sort keys are often less efficient than simply doing comparison. For more details, see the ICU User Guide.
| source | string to be processed. |
| sourceLength | length of string to be processed. If -1, the string is 0 terminated and length will be decided by the function. |
| result | buffer to store result in. If nullptr, number of bytes needed will be returned. |
| resultLength | length of the result buffer. If if not enough the buffer will be filled to capacity. |
Implements icu::Collator.
Gets the NFD form of the current source we are iterating over.
| virtual int32_t icu::final::getStackLimit | ( | ) | const [virtual] |
Get the size of the heap storage available for use by the back tracking stack.
| static UClassID icu::final::getStaticClassID | ( | ) | [static] |
ICU "poor man's RTTI", returns a UClassID for this class.
Reimplemented from icu::UnicodeFilter.
| static UClassID icu::final::getStaticClassID | ( | ) | [static] |
ICU "poor man's RTTI", returns a UClassID for this class.
Reimplemented from icu::UnicodeFilter.
| static UClassID icu::final::getStaticClassID | ( | ) | [static] |
ICU "poor man's RTTI", returns a UClassID for this class.
Reimplemented from icu::UnicodeFilter.
| static UClassID icu::final::getStaticClassID | ( | ) | [static] |
ICU "poor man's RTTI", returns a UClassID for this class.
Reimplemented from icu::UnicodeFilter.
| static UClassID icu::final::getStaticClassID | ( | ) | [static] |
ICU "poor man's RTTI", returns a UClassID for this class.
Reimplemented from icu::UnicodeFilter.
| static UClassID icu::final::getStaticClassID | ( | void | ) | [static] |
Returns the class ID for this class.
This is useful only for comparing to a return value from getDynamicClassID(). For example:
Base* polymorphic_pointer = createPolymorphicObject(); if (polymorphic_pointer->getDynamicClassID() == Derived::getStaticClassID()) ...
Reimplemented from icu::UnicodeFilter.
| static UClassID icu::final::getStaticClassID | ( | ) | [static] |
ICU "poor man's RTTI", returns a UClassID for this class.
Reimplemented from icu::UnicodeFilter.
| static UClassID icu::final::getStaticClassID | ( | ) | [static] |
ICU "poor man's RTTI", returns a UClassID for this class.
Reimplemented from icu::UnicodeFilter.
| static UClassID icu::final::getStaticClassID | ( | void | ) | [static] |
Return the class ID for this class.
This is useful only for comparing to a return value from getDynamicClassID(). For example:
. Base* polymorphic_pointer = createPolymorphicObject(); . if (polymorphic_pointer->getDynamicClassID() == . Derived::getStaticClassID()) ...
Reimplemented from icu::UnicodeFilter.
| static UClassID icu::final::getStaticClassID | ( | ) | [static] |
ICU "poor man's RTTI", returns a UClassID for this class.
Reimplemented from icu::UnicodeFilter.
| const UnicodeString& icu::final::getString | ( | ) |
Returns the current string, if isString() returned true.
If the current iteration item is a code point, a UnicodeString containing that single code point is returned.
Ownership of the returned string remains with the iterator. The string is guaranteed to remain valid only until the iterator is advanced to the next item, or until the iterator is deleted.
| virtual UnicodeSet* icu::final::getTailoredSet | ( | UErrorCode & | status | ) | const [override, virtual] |
Get a UnicodeSet that contains all the characters and sequences tailored in this collator.
| status | error code of the operation |
Reimplemented from icu::Collator.
| UnicodeString icu::final::getTextWithNoArguments | ( | ) | const [inline] |
Returns the pattern text with none of the arguments.
Like formatting with all-empty string values.
Definition at line 270 of file simpleformatter.h.
| UnicodeString icu::final::getTextWithNoArguments | ( | int32_t * | offsets, |
| int32_t | offsetsLength | ||
| ) | const [inline] |
Returns the pattern text with none of the arguments.
Like formatting with all-empty string values.
TODO(ICU-20406): Replace this with an Iterator interface.
| offsets | offsets[i] receives the offset of where {i} was located before it was replaced by an empty string. For example, "a{0}b{1}" produces offset 1 for i=0 and 2 for i=1. Can be nullptr if offsetsLength==0. If there is no {i} in the pattern, then offsets[i] is set to -1. |
| offsetsLength | The length of the offsets array. |
Definition at line 294 of file simpleformatter.h.
| virtual int32_t icu::final::getTimeLimit | ( | ) | const [virtual] |
Get the time limit, if any, for match operations made with this Matcher.
| UnicodeString& icu::final::getTimeSeparatorString | ( | UnicodeString & | result | ) | const |
Gets the time separator string.
For example: ":".
| result | Output param which will receive the time separator string. |
| virtual uint32_t icu::final::getVariableTop | ( | UErrorCode & | status | ) | const [override, virtual] |
Gets the variable top value of a Collator.
| status | error code (not changed by function). If error code is set, the return value is undefined. |
Implements icu::Collator.
| virtual void icu::final::getVersion | ( | UVersionInfo | info | ) | const [override, virtual] |
Gets the version information for a Collator.
| info | the version # information, the result will be filled in |
Implements icu::Collator.
| const UnicodeString* icu::final::getWeekdays | ( | int32_t & | count | ) | const |
Gets wide weekday strings.
For example: "Sunday", "Monday", etc.
| count | Filled in with length of the array. |
| const UnicodeString* icu::final::getWeekdays | ( | int32_t & | count, |
| DtContextType | context, | ||
| DtWidthType | width | ||
| ) | const |
Gets weekday strings by width and context.
For example: "Sunday", "Monday", etc.
| count | Filled in with length of the array. |
| context | The formatting context, either FORMAT or STANDALONE |
| width | The width of returned strings, either WIDE, ABBREVIATED, SHORT, or NARROW |
| const UnicodeString* icu::final::getYearNames | ( | int32_t & | count, |
| DtContextType | context, | ||
| DtWidthType | width | ||
| ) | const |
Gets cyclic year name strings if the calendar has them, by width and context.
For example: "jia-zi", "yi-chou", etc.
| count | Filled in with length of the array. |
| context | The usage context: FORMAT, STANDALONE. |
| width | The requested name width: WIDE, ABBREVIATED, NARROW. |
| const UnicodeString* icu::final::getZodiacNames | ( | int32_t & | count, |
| DtContextType | context, | ||
| DtWidthType | width | ||
| ) | const |
Gets calendar zodiac name strings if the calendar has them, by width and context.
For example: "Rat", "Ox", "Tiger", etc.
| count | Filled in with length of the array. |
| context | The usage context: FORMAT, STANDALONE. |
| width | The requested name width: WIDE, ABBREVIATED, NARROW. |
| const UnicodeString** icu::final::getZoneStrings | ( | int32_t & | rowCount, |
| int32_t & | columnCount | ||
| ) | const |
Gets timezone strings.
These strings are stored in a 2-dimensional array.
| rowCount | Output param to receive number of rows. |
| columnCount | Output param to receive number of columns. |
| virtual UnicodeString icu::final::group | ( | UErrorCode & | status | ) | const [virtual] |
Returns a string containing the text matched by the previous match.
If the pattern can match an empty string, an empty string may be returned.
| status | A reference to a UErrorCode to receive any errors. Possible errors are U_REGEX_INVALID_STATE if no match has been attempted or the last match failed. |
| virtual UnicodeString icu::final::group | ( | int32_t | groupNum, |
| UErrorCode & | status | ||
| ) | const [virtual] |
Returns a string containing the text captured by the given group during the previous match operation.
Group(0) is the entire match.
A zero length string is returned both for capture groups that did not participate in the match and for actual zero length matches. To distinguish between these two cases use the function start(), which returns -1 for non-participating groups.
| groupNum | the capture group number |
| status | A reference to a UErrorCode to receive any errors. Possible errors are U_REGEX_INVALID_STATE if no match has been attempted or the last match failed and U_INDEX_OUTOFBOUNDS_ERROR for a bad capture group number. |
| virtual UText* icu::final::group | ( | UText * | dest, |
| int64_t & | group_len, | ||
| UErrorCode & | status | ||
| ) | const [virtual] |
Returns a shallow clone of the entire live input string with the UText current native index set to the beginning of the requested group.
| dest | The UText into which the input should be cloned, or nullptr to create a new UText |
| group_len | A reference to receive the length of the desired capture group |
| status | A reference to a UErrorCode to receive any errors. Possible errors are U_REGEX_INVALID_STATE if no match has been attempted or the last match failed and U_INDEX_OUTOFBOUNDS_ERROR for a bad capture group number. |
| virtual UText* icu::final::group | ( | int32_t | groupNum, |
| UText * | dest, | ||
| int64_t & | group_len, | ||
| UErrorCode & | status | ||
| ) | const [virtual] |
Returns a shallow clone of the entire live input string with the UText current native index set to the beginning of the requested group.
A group length of zero is returned both for capture groups that did not participate in the match and for actual zero length matches. To distinguish between these two cases use the function start(), which returns -1 for non-participating groups.
| groupNum | The capture group number. |
| dest | The UText into which the input should be cloned, or nullptr to create a new UText. |
| group_len | A reference to receive the length of the desired capture group |
| status | A reference to a UErrorCode to receive any errors. Possible errors are U_REGEX_INVALID_STATE if no match has been attempted or the last match failed and U_INDEX_OUTOFBOUNDS_ERROR for a bad capture group number. |
| virtual int32_t icu::final::groupCount | ( | ) | const [virtual] |
Returns the number of capturing groups in this matcher's pattern.
| virtual int32_t icu::final::groupNumberFromName | ( | const UnicodeString & | groupName, |
| UErrorCode & | status | ||
| ) | const [virtual] |
Get the group number corresponding to a named capture group.
The returned number can be used with any function that access capture groups by number.
The function returns an error status if the specified name does not appear in the pattern.
| groupName | The capture group name. |
| status | A UErrorCode to receive any errors. |
| virtual int32_t icu::final::groupNumberFromName | ( | const char * | groupName, |
| int32_t | nameLength, | ||
| UErrorCode & | status | ||
| ) | const [virtual] |
Get the group number corresponding to a named capture group.
The returned number can be used with any function that access capture groups by number.
The function returns an error status if the specified name does not appear in the pattern.
| groupName | The capture group name, platform invariant characters only. |
| nameLength | The length of the name, or -1 if the name is nul-terminated. |
| status | A UErrorCode to receive any errors. |
| virtual int32_t icu::final::handleNext | ( | int32_t | position, |
| UErrorCode & | status | ||
| ) | [override, protected, virtual] |
Search forward for matching text, starting at a given location.
Clients should not call this method directly; instead they should call SearchIterator#next.
If a match is found, this method returns the index at which the match starts and calls SearchIterator#setMatchLength with the number of characters in the target text that make up the match. If no match is found, the method returns USEARCH_DONE.
The StringSearch is adjusted so that its current index (as returned by getOffset) is the match position if one was found. If a match is not found, USEARCH_DONE will be returned and the StringSearch will be adjusted to the index USEARCH_DONE.
| position | The index in the target text at which the search starts |
| status | for errors if any occurs |
Implements icu::SearchIterator.
| virtual int32_t icu::final::handlePrev | ( | int32_t | position, |
| UErrorCode & | status | ||
| ) | [override, protected, virtual] |
Search backward for matching text, starting at a given location.
Clients should not call this method directly; instead they should call SearchIterator.previous(), which this method overrides.
If a match is found, this method returns the index at which the match starts and calls SearchIterator#setMatchLength with the number of characters in the target text that make up the match. If no match is found, the method returns USEARCH_DONE.
The StringSearch is adjusted so that its current index (as returned by getOffset) is the match position if one was found. If a match is not found, USEARCH_DONE will be returned and the StringSearch will be adjusted to the index USEARCH_DONE.
| position | The index in the target text at which the search starts. |
| status | for errors if any occurs |
Implements icu::SearchIterator.
| virtual UBool icu::final::hasAnchoringBounds | ( | ) | const [virtual] |
Return true if this matcher is using anchoring bounds.
By default, matchers use anchoring region bounds.
| UBool icu::final::hasChanges | ( | ) | const [inline] |
| virtual int32_t icu::final::hashCode | ( | ) | const [override, virtual] |
Generates the hash code for the rule-based collation object.
Implements icu::Collator.
| virtual int32_t icu::final::hashCode | ( | void | ) | const [virtual] |
Returns the hash code value for this set.
Implements icu::Collator.
| UBool icu::final::hasStrings | ( | ) | const |
| virtual UBool icu::final::hasTransparentBounds | ( | ) | const [virtual] |
Queries the transparency of region bounds for this matcher.
See useTransparentBounds for a description of transparent and opaque bounds. By default, a matcher uses opaque region boundaries.
| virtual UBool icu::final::hitEnd | ( | ) | const [virtual] |
Return true if the most recent matching operation attempted to access additional input beyond the available input text.
In this case, additional input text could change the results of the match.
hitEnd() is defined for both successful and unsuccessful matches. In either case hitEnd() will return true if if the end of the text was reached at any point during the matching process.
| int32_t icu::final::indexOf | ( | UChar32 | c | ) | const |
| virtual const UnicodeString& icu::final::input | ( | ) | const [virtual] |
| virtual UText* icu::final::inputText | ( | ) | const [virtual] |
Returns the input string being matched.
This is the live input text; it should not be altered or deleted. This method will work even if the input was originally supplied as a UnicodeString.
| void icu::final::internalAddContractions | ( | UChar32 | c, |
| UnicodeSet & | set, | ||
| UErrorCode & | errorCode | ||
| ) | const |
Adds the contractions that start with character c to the set.
Ignores prefixes. Used by AlphabeticIndex.
| void icu::final::internalBuildTailoring | ( | const UnicodeString & | rules, |
| int32_t | strength, | ||
| UColAttributeValue | decompositionMode, | ||
| UParseError * | outParseError, | ||
| UnicodeString * | outReason, | ||
| UErrorCode & | errorCode | ||
| ) |
Implements from-rule constructors, and ucol_openRules().
| virtual UCollationResult icu::final::internalCompareUTF8 | ( | const char * | left, |
| int32_t | leftLength, | ||
| const char * | right, | ||
| int32_t | rightLength, | ||
| UErrorCode & | errorCode | ||
| ) | const [override, virtual] |
Implements ucol_strcollUTF8().
Reimplemented from icu::Collator.
| void icu::final::internalGetCEs | ( | const UnicodeString & | str, |
| UVector64 & | ces, | ||
| UErrorCode & | errorCode | ||
| ) | const |
Appends the CEs for the string to the vector.
| void icu::final::internalGetContractionsAndExpansions | ( | UnicodeSet * | contractions, |
| UnicodeSet * | expansions, | ||
| UBool | addPrefixes, | ||
| UErrorCode & | errorCode | ||
| ) | const |
Implements ucol_getContractionsAndExpansions().
Gets this collator's sets of contraction strings and/or characters and strings that map to multiple collation elements (expansions). If addPrefixes is true, then contractions that are expressed as prefix/pre-context rules are included.
| contractions | if not nullptr, the set to hold the contractions |
| expansions | if not nullptr, the set to hold the expansions |
| addPrefixes | include prefix contextual mappings |
| errorCode | in/out ICU error code |
| const char* icu::final::internalGetLocaleID | ( | ULocDataLocaleType | type, |
| UErrorCode & | errorCode | ||
| ) | const |
Implements ucol_getLocaleByType().
Needed because the lifetime of the locale ID string must match that of the collator. getLocale() returns a copy of a Locale, with minimal lifetime in a C wrapper.
| virtual int32_t icu::final::internalGetShortDefinitionString | ( | const char * | locale, |
| char * | buffer, | ||
| int32_t | capacity, | ||
| UErrorCode & | status | ||
| ) | const [override, virtual] |
Get the short definition string for a collator.
This internal API harvests the collator's locale and the attribute set and produces a string that can be used for opening a collator with the same attributes using the ucol_openFromShortString API. This string will be normalized. The structure and the syntax of the string is defined in the "Naming collators" section of the users guide: https://unicode-org.github.io/icu/userguide/collation/concepts#collator-naming-scheme This function supports preflighting.
This is internal, and intended to be used with delegate converters.
| locale | a locale that will appear as a collators locale in the resulting short string definition. If nullptr, the locale will be harvested from the collator. |
| buffer | space to hold the resulting string |
| capacity | capacity of the buffer |
| status | for returning errors. All the preflighting errors are featured |
Reimplemented from icu::Collator.
| virtual int32_t icu::final::internalNextSortKeyPart | ( | UCharIterator * | iter, |
| uint32_t | state[2], | ||
| uint8_t * | dest, | ||
| int32_t | count, | ||
| UErrorCode & | errorCode | ||
| ) | const [override, virtual] |
Implements ucol_nextSortKeyPart().
Reimplemented from icu::Collator.
| UBool icu::final::isBogus | ( | void | ) | const [inline] |
Determine if this object contains a valid set.
A bogus set has no value. It is different from an empty set. It can be used to indicate that no set value is available.
| virtual UBool icu::final::isEmpty | ( | void | ) | const [virtual] |
Returns true if this set contains no elements.
true if this set contains no elements. | UBool icu::final::isFrozen | ( | ) | const [inline] |
Determines whether the set has been frozen (made immutable) or not.
See the ICU4J Freezable interface for details.
| static UBool icu::final::isIgnorable | ( | int32_t | order | ) | [inline, static] |
Checks if a comparison order is ignorable.
| order | the collation order. |
| UBool icu::final::isString | ( | ) | const [inline] |
Returns true if the current element is a string.
If so, the caller can retrieve it with getString(). If this method returns false, the current element is a code point or code point range, depending on whether next() or nextRange() was called. Elements of types string and codepoint can both be retrieved with the function getString(). Elements of type codepoint can also be retrieved with getCodepoint(). For ranges, getCodepoint() returns the starting codepoint of the range, and getCodepointEnd() returns the end of the range.
| int32_t icu::final::lengthDelta | ( | ) | const [inline] |
| virtual UBool icu::final::lookingAt | ( | UErrorCode & | status | ) | [virtual] |
Attempts to match the input string, starting from the beginning of the region, against the pattern.
Like the matches() method, this function always starts at the beginning of the input region; unlike that function, it does not require that the entire region be matched.
If the match succeeds then more information can be obtained via the start(), end(), and group() functions.
| status | A reference to a UErrorCode to receive any errors. |
| virtual UBool icu::final::lookingAt | ( | int64_t | startIndex, |
| UErrorCode & | status | ||
| ) | [virtual] |
Attempts to match the input string, starting from the specified index, against the pattern.
The match may be of any length, and is not required to extend to the end of the input string. Contrast with match().
If the match succeeds then more information can be obtained via the start(), end(), and group() functions.
| startIndex | The input string (native) index at which to begin matching. |
| status | A reference to a UErrorCode to receive any errors. |
| virtual RegexMatcher* icu::final::matcher | ( | const UnicodeString & | input, |
| UErrorCode & | status | ||
| ) | const [virtual] |
Creates a RegexMatcher that will match the given input against this pattern.
The RegexMatcher can then be used to perform match, find or replace operations on the input. Note that a RegexPattern object must not be deleted while RegexMatchers created from it still exist and might possibly be used again.
The matcher will retain a reference to the supplied input string, and all regexp pattern matching operations happen directly on this original string. It is critical that the string not be altered or deleted before use by the regular expression operations is complete.
| input | The input string to which the regular expression will be applied. |
| status | A reference to a UErrorCode to receive any errors. |
| virtual RegexMatcher* icu::final::matcher | ( | UErrorCode & | status | ) | const [virtual] |
Creates a RegexMatcher that will match against this pattern.
The RegexMatcher can be used to perform match, find or replace operations. Note that a RegexPattern object must not be deleted while RegexMatchers created from it still exist and might possibly be used again.
| status | A reference to a UErrorCode to receive any errors. |
| static UBool icu::final::matches | ( | const UnicodeString & | regex, |
| const UnicodeString & | input, | ||
| UParseError & | pe, | ||
| UErrorCode & | status | ||
| ) | [static] |
Test whether a string matches a regular expression.
This convenience function both compiles the regular expression and applies it in a single operation. Note that if the same pattern needs to be applied repeatedly, this method will be less efficient than creating and reusing a RegexMatcher object.
| regex | The regular expression |
| input | The string data to be matched |
| pe | Receives the position of any syntax errors within the regular expression |
| status | A reference to a UErrorCode to receive any errors. |
| static UBool icu::final::matches | ( | UText * | regex, |
| UText * | input, | ||
| UParseError & | pe, | ||
| UErrorCode & | status | ||
| ) | [static] |
Test whether a string matches a regular expression.
This convenience function both compiles the regular expression and applies it in a single operation. Note that if the same pattern needs to be applied repeatedly, this method will be less efficient than creating and reusing a RegexMatcher object.
| regex | The regular expression |
| input | The string data to be matched |
| pe | Receives the position of any syntax errors within the regular expression |
| status | A reference to a UErrorCode to receive any errors. |
| virtual UBool icu::final::matches | ( | UErrorCode & | status | ) | [virtual] |
Attempts to match the entire input region against the pattern.
| status | A reference to a UErrorCode to receive any errors. |
| virtual UBool icu::final::matches | ( | int64_t | startIndex, |
| UErrorCode & | status | ||
| ) | [virtual] |
Resets the matcher, then attempts to match the input beginning at the specified startIndex, and extending to the end of the input.
The input region is reset to include the entire input string. A successful match must extend to the end of the input.
| startIndex | The input string (native) index at which to begin matching. |
| status | A reference to a UErrorCode to receive any errors. |
| virtual UMatchDegree icu::final::matches | ( | const Replaceable & | text, |
| int32_t & | offset, | ||
| int32_t | limit, | ||
| UBool | incremental | ||
| ) | [override, virtual] |
| Edits& icu::final::mergeAndAppend | ( | const Edits & | ab, |
| const Edits & | bc, | ||
| UErrorCode & | errorCode | ||
| ) |
Merges the two input Edits and appends the result to this object.
Consider two string transformations (for example, normalization and case mapping) where each records Edits in addition to writing an output string.
Edits ab reflect how substrings of input string a map to substrings of intermediate string b.
Edits bc reflect how substrings of intermediate string b map to substrings of output string c.
This function merges ab and bc such that the additional edits recorded in this object reflect how substrings of input string a map to substrings of output string c.
If unrelated Edits are passed in where the output string of the first has a different length than the input string of the second, then a U_ILLEGAL_ARGUMENT_ERROR is reported.
| ab | reflects how substrings of input string a map to substrings of intermediate string b. |
| bc | reflects how substrings of intermediate string b map to substrings of output string c. |
| errorCode | ICU error code. Its input value must pass the U_SUCCESS() test, or else the function returns immediately. Check for U_FAILURE() on output or use with function chaining. (See User Guide for details.) |
Get the next canonically equivalent string.
Warning: The strings are not guaranteed to be in any particular order.
| int32_t icu::final::next | ( | UErrorCode & | status | ) |
Gets the ordering priority of the next character in the string.
| status | the error code status. |
Reimplemented from icu::SearchIterator.
Advances the iteration position to the next element in the set, which can be either a single code point or a string.
If there are no more elements in the set, return false.
If isString() == true, the value is a string, otherwise the value is a single code point. Elements of either type can be retrieved with the function getString(), while elements of consisting of a single code point can be retrieved with getCodepoint()
The order of iteration is all code points in sorted order, followed by all strings sorted order. Do not mix calls to next() and nextRange() without calling reset() between them. The results of doing so are undefined.
Returns the next element in the set, either a code point range or a string.
If there are no more elements in the set, return false. If isString() == true, the value is a string and can be accessed with getString(). Otherwise the value is a range of one or more code points from getCodepoint() to getCodepointeEnd() inclusive.
The order of iteration is all code points ranges in sorted order, followed by all strings sorted order. Ranges are disjoint and non-contiguous. The value returned from getString() is undefined unless isString() == true. Do not mix calls to next() and nextRange() without calling reset() between them. The results of doing so are undefined.
| int32_t icu::final::numberOfChanges | ( | ) | const [inline] |
| icu::final::operator char16_t * | ( | ) | const [inline] |
char16_t pointer access via type conversion (e.g., static_cast).
Definition at line 90 of file char16ptr.h.
| icu::final::operator const char16_t * | ( | ) | const [inline] |
char16_t pointer access via type conversion (e.g., static_cast).
Definition at line 198 of file char16ptr.h.
| bool icu::final::operator!= | ( | const RegexPattern & | that | ) | const [inline] |
Comparison operator.
Two RegexPattern objects are considered equal if they were constructed from identical source patterns using the same URegexpFlag settings.
| that | a RegexPattern object to compare with "this". |
Definition at line 132 of file regex.h.
References icu::operator==().
| bool icu::final::operator!= | ( | const CollationElementIterator & | other | ) | const |
Returns true if "other" is not the same as "this".
| other | the object to be compared |
| bool icu::final::operator!= | ( | const DateFormatSymbols & | other | ) | const [inline] |
Return true if another object is semantically unequal to this one.
| other | the DateFormatSymbols object to be compared with. |
Definition at line 186 of file dtfmtsym.h.
References icu::operator==().
| bool icu::final::operator!= | ( | const DateIntervalInfo & | other | ) | const |
Return true if another object is semantically unequal to this one.
| other | the DateIntervalInfo object to be compared with. |
| bool icu::final::operator!= | ( | const UnicodeSet & | o | ) | const [inline] |
Compares the specified object with this set for equality.
Returns true if the specified set is not equal to this set.
| SimpleFormatter& icu::final::operator= | ( | const SimpleFormatter & | other | ) |
Assignment operator.
Move assignment operator, might leave src empty.
This object will have the same contents that the source object had. The behavior is undefined if *this and src are the same object.
| src | source edits |
| RegexPattern& icu::final::operator= | ( | const RegexPattern & | source | ) |
Assignment operator.
After assignment, this RegexPattern will behave identically to the source object.
| DateFormatSymbols& icu::final::operator= | ( | const DateFormatSymbols & | ) |
Assignment operator.
| DateIntervalInfo& icu::final::operator= | ( | const DateIntervalInfo & | ) |
Assignment operator.
| RuleBasedCollator& icu::final::operator= | ( | const RuleBasedCollator & | other | ) |
| StringSearch& icu::final::operator= | ( | const StringSearch & | that | ) |
Assignment operator.
Sets this iterator to have the same behavior, and iterate over the same text, as the one passed in.
| that | instance to be copied. |
| UnicodeSet& icu::final::operator= | ( | const UnicodeSet & | o | ) |
| bool icu::final::operator== | ( | const RegexPattern & | that | ) | const |
Comparison operator.
Two RegexPattern objects are considered equal if they were constructed from identical source patterns using the same URegexpFlag settings.
| that | a RegexPattern object to compare with "this". |
| bool icu::final::operator== | ( | const CollationElementIterator & | other | ) | const |
Returns true if "other" is the same as "this".
| other | the object to be compared |
| bool icu::final::operator== | ( | const DateFormatSymbols & | other | ) | const |
Return true if another object is semantically equal to this one.
| other | the DateFormatSymbols object to be compared with. |
| virtual bool icu::final::operator== | ( | const DateIntervalInfo & | other | ) | const [virtual] |
Return true if another object is semantically equal to this one.
| other | the DateIntervalInfo object to be compared with. |
| virtual bool icu::final::operator== | ( | const Collator & | other | ) | const [override, virtual] |
Returns true if argument is the same as this object.
| other | Collator object to be compared. |
Reimplemented from icu::Collator.
| virtual bool icu::final::operator== | ( | const SearchIterator & | that | ) | const [override, virtual] |
Equality operator.
| that | instance to be compared. |
Reimplemented from icu::SearchIterator.
| virtual bool icu::final::operator== | ( | const UnicodeSet & | o | ) | const [virtual] |
Compares the specified object with this set for equality.
Returns true if the two sets have the same size, and every member of the specified set is contained in this set (or equivalently, every member of this set is contained in the specified set).
| o | set to be compared for equality with this set. |
true if the specified set is equal to this set. | virtual UnicodeString icu::final::pattern | ( | ) | const [virtual] |
Returns the regular expression from which this pattern was compiled.
This method will work even if the pattern was compiled from a UText.
Note: If the pattern was originally compiled from a UText, and that UText was modified, the returned string may no longer reflect the RegexPattern object.
| virtual const RegexPattern& icu::final::pattern | ( | ) | const [virtual] |
Returns the pattern that is interpreted by this matcher.
| virtual UText* icu::final::patternText | ( | UErrorCode & | status | ) | const [virtual] |
Returns the regular expression from which this pattern was compiled.
This method will work even if the pattern was compiled from a UnicodeString.
Note: This is the original input, not a clone. If the pattern was originally compiled from a UText, and that UText was modified, the returned UText may no longer reflect the RegexPattern object.
| static void icu::final::permute | ( | UnicodeString & | source, |
| UBool | skipZeros, | ||
| Hashtable * | result, | ||
| UErrorCode & | status | ||
| ) | [static] |
Dumb recursive implementation of permutation.
TODO: optimize
| source | the string to find permutations for |
| skipZeros | determine if skip zeros |
| result | the results in a set. |
| status | Fill-in parameter which receives the status of this operation. |
| int32_t icu::final::previous | ( | UErrorCode & | status | ) |
Get the ordering priority of the previous collation element in the string.
| status | the error code status. |
Reimplemented from icu::SearchIterator.
| static int32_t icu::final::primaryOrder | ( | int32_t | order | ) | [inline, static] |
Gets the primary order of a collation order.
| order | the collation order |
| static RuleBasedCollator* icu::final::rbcFromUCollator | ( | UCollator * | uc | ) | [inline, static] |
| static const RuleBasedCollator* icu::final::rbcFromUCollator | ( | const UCollator * | uc | ) | [inline, static] |
| virtual RegexMatcher& icu::final::refreshInputText | ( | UText * | input, |
| UErrorCode & | status | ||
| ) | [virtual] |
Set the subject text string upon which the regular expression is looking for matches without changing any other aspect of the matching state.
The new and previous text strings must have the same content.
This function is intended for use in environments where ICU is operating on strings that may move around in memory. It provides a mechanism for notifying ICU that the string has been relocated, and providing a new UText to access the string in its new position.
Note that the regular expression implementation never copies the underlying text of a string being matched, but always operates directly on the original text provided by the user. Refreshing simply drops the references to the old text and replaces them with references to the new.
Caution: this function is normally used only by very specialized, system-level code. One example use case is with garbage collection that moves the text in memory.
| input | The new (moved) text string. |
| status | Receives errors detected by this function. |
| icu::final::RegexMatcher | ( | const UnicodeString & | regexp, |
| uint32_t | flags, | ||
| UErrorCode & | status | ||
| ) |
Construct a RegexMatcher for a regular expression.
This is a convenience method that avoids the need to explicitly create a RegexPattern object. Note that if several RegexMatchers need to be created for the same expression, it will be more efficient to separately create and cache a RegexPattern object, and use its matcher() method to create the RegexMatcher objects.
| regexp | The Regular Expression to be compiled. |
| flags | URegexpFlag options, such as UREGEX_CASE_INSENSITIVE. |
| status | Any errors are reported by setting this UErrorCode variable. |
| icu::final::RegexMatcher | ( | UText * | regexp, |
| uint32_t | flags, | ||
| UErrorCode & | status | ||
| ) |
Construct a RegexMatcher for a regular expression.
This is a convenience method that avoids the need to explicitly create a RegexPattern object. Note that if several RegexMatchers need to be created for the same expression, it will be more efficient to separately create and cache a RegexPattern object, and use its matcher() method to create the RegexMatcher objects.
| regexp | The regular expression to be compiled. |
| flags | URegexpFlag options, such as UREGEX_CASE_INSENSITIVE. |
| status | Any errors are reported by setting this UErrorCode variable. |
| icu::final::RegexMatcher | ( | const UnicodeString & | regexp, |
| const UnicodeString & | input, | ||
| uint32_t | flags, | ||
| UErrorCode & | status | ||
| ) |
Construct a RegexMatcher for a regular expression.
This is a convenience method that avoids the need to explicitly create a RegexPattern object. Note that if several RegexMatchers need to be created for the same expression, it will be more efficient to separately create and cache a RegexPattern object, and use its matcher() method to create the RegexMatcher objects.
The matcher will retain a reference to the supplied input string, and all regexp pattern matching operations happen directly on the original string. It is critical that the string not be altered or deleted before use by the regular expression operations is complete.
| regexp | The Regular Expression to be compiled. |
| input | The string to match. The matcher retains a reference to the caller's string; mo copy is made. |
| flags | URegexpFlag options, such as UREGEX_CASE_INSENSITIVE. |
| status | Any errors are reported by setting this UErrorCode variable. |
| icu::final::RegexMatcher | ( | UText * | regexp, |
| UText * | input, | ||
| uint32_t | flags, | ||
| UErrorCode & | status | ||
| ) |
Construct a RegexMatcher for a regular expression.
This is a convenience method that avoids the need to explicitly create a RegexPattern object. Note that if several RegexMatchers need to be created for the same expression, it will be more efficient to separately create and cache a RegexPattern object, and use its matcher() method to create the RegexMatcher objects.
The matcher will make a shallow clone of the supplied input text, and all regexp pattern matching operations happen on this clone. While read-only operations on the supplied text are permitted, it is critical that the underlying string not be altered or deleted before use by the regular expression operations is complete.
| regexp | The Regular Expression to be compiled. |
| input | The string to match. The matcher retains a shallow clone of the text. |
| flags | URegexpFlag options, such as UREGEX_CASE_INSENSITIVE. |
| status | Any errors are reported by setting this UErrorCode variable. |
| icu::final::RegexPattern | ( | ) |
default constructor.
Create a RegexPattern object that refers to no actual pattern. Not normally needed; RegexPattern objects are usually created using the factory method `compile()`.
| icu::final::RegexPattern | ( | const RegexPattern & | source | ) |
Copy Constructor.
Create a new RegexPattern object that is equivalent to the source object.
| source | the pattern object to be copied. |
| virtual RegexMatcher& icu::final::region | ( | int64_t | start, |
| int64_t | limit, | ||
| UErrorCode & | status | ||
| ) | [virtual] |
Sets the limits of this matcher's region.
The region is the part of the input string that will be searched to find a match. Invoking this method resets the matcher, and then sets the region to start at the index specified by the start parameter and end at the index specified by the end parameter.
Depending on the transparency and anchoring being used (see useTransparentBounds and useAnchoringBounds), certain constructs such as anchors may behave differently at or around the boundaries of the region
The function will fail if start is greater than limit, or if either index is less than zero or greater than the length of the string being matched.
| start | The (native) index to begin searches at. |
| limit | The index to end searches at (exclusive). |
| status | A reference to a UErrorCode to receive any errors. |
| virtual RegexMatcher& icu::final::region | ( | int64_t | regionStart, |
| int64_t | regionLimit, | ||
| int64_t | startIndex, | ||
| UErrorCode & | status | ||
| ) | [virtual] |
Identical to region(start, limit, status) but also allows a start position without resetting the region state.
| regionStart | The region start |
| regionLimit | the limit of the region |
| startIndex | The (native) index within the region bounds at which to begin searches. |
| status | A reference to a UErrorCode to receive any errors. If startIndex is not within the specified region bounds, U_INDEX_OUTOFBOUNDS_ERROR is returned. |
| virtual int32_t icu::final::regionEnd | ( | ) | const [virtual] |
Reports the end (limit) index (exclusive) of this matcher's region.
The searches this matcher conducts are limited to finding matches within regionStart (inclusive) and regionEnd (exclusive).
| virtual int64_t icu::final::regionEnd64 | ( | ) | const [virtual] |
Reports the end (limit) index (exclusive) of this matcher's region.
The searches this matcher conducts are limited to finding matches within regionStart (inclusive) and regionEnd (exclusive).
| virtual int32_t icu::final::regionStart | ( | ) | const [virtual] |
Reports the start index of this matcher's region.
The searches this matcher conducts are limited to finding matches within regionStart (inclusive) and regionEnd (exclusive).
| virtual int64_t icu::final::regionStart64 | ( | ) | const [virtual] |
Reports the start index of this matcher's region.
The searches this matcher conducts are limited to finding matches within regionStart (inclusive) and regionEnd (exclusive).
| virtual UnicodeSet& icu::final::remove | ( | UChar32 | start, |
| UChar32 | end | ||
| ) | [virtual] |
Removes the specified range from this set if it is present.
The set will not contain the specified range once the call returns. If start > end then an empty range is removed, leaving the set unchanged. A frozen set will not be modified.
| start | first character, inclusive, of range to be removed from this set. |
| end | last character, inclusive, of range to be removed from this set. |
Removes the specified character from this set if it is present.
The set will not contain the specified range once the call returns. A frozen set will not be modified.
| c | the character (code point) |
| UnicodeSet& icu::final::remove | ( | const UnicodeString & | s | ) |
Removes the specified string from this set if it is present.
The set will not contain the specified character once the call returns. A frozen set will not be modified.
| s | the source string |
| UnicodeSet& icu::final::removeAll | ( | const UnicodeString & | s | ) |
Remove EACH of the characters in this string.
Note: "ch" == {"c", "h"} A frozen set will not be modified.
| s | the source string |
| virtual UnicodeSet& icu::final::removeAll | ( | const UnicodeSet & | c | ) | [virtual] |
Removes from this set all of its elements that are contained in the specified set.
This operation effectively modifies this set so that its value is the asymmetric set difference of the two sets. A frozen set will not be modified.
| c | set that defines which elements will be removed from this set. |
| virtual UnicodeSet& icu::final::removeAllStrings | ( | ) | [virtual] |
| virtual UnicodeString icu::final::replaceAll | ( | const UnicodeString & | replacement, |
| UErrorCode & | status | ||
| ) | [virtual] |
Replaces every substring of the input that matches the pattern with the given replacement string.
This is a convenience function that provides a complete find-and-replace-all operation.
This method first resets this matcher. It then scans the input string looking for matches of the pattern. Input that is not part of any match is left unchanged; each match is replaced in the result by the replacement string. The replacement string may contain references to capture groups.
| replacement | a string containing the replacement text. |
| status | a reference to a UErrorCode to receive any errors. |
| virtual UText* icu::final::replaceAll | ( | UText * | replacement, |
| UText * | dest, | ||
| UErrorCode & | status | ||
| ) | [virtual] |
Replaces every substring of the input that matches the pattern with the given replacement string.
This is a convenience function that provides a complete find-and-replace-all operation.
This method first resets this matcher. It then scans the input string looking for matches of the pattern. Input that is not part of any match is left unchanged; each match is replaced in the result by the replacement string. The replacement string may contain references to capture groups.
| replacement | a string containing the replacement text. |
| dest | a mutable UText in which the results are placed. If nullptr, a new UText will be created (which may not be mutable). |
| status | a reference to a UErrorCode to receive any errors. |
| virtual UnicodeString icu::final::replaceFirst | ( | const UnicodeString & | replacement, |
| UErrorCode & | status | ||
| ) | [virtual] |
Replaces the first substring of the input that matches the pattern with the replacement string.
This is a convenience function that provides a complete find-and-replace operation.
This function first resets this RegexMatcher. It then scans the input string looking for a match of the pattern. Input that is not part of the match is appended directly to the result string; the match is replaced in the result by the replacement string. The replacement string may contain references to captured groups.
The state of the matcher (the position at which a subsequent find() would begin) after completing a replaceFirst() is not specified. The RegexMatcher should be reset before doing additional find() operations.
| replacement | a string containing the replacement text. |
| status | a reference to a UErrorCode to receive any errors. |
| virtual UText* icu::final::replaceFirst | ( | UText * | replacement, |
| UText * | dest, | ||
| UErrorCode & | status | ||
| ) | [virtual] |
Replaces the first substring of the input that matches the pattern with the replacement string.
This is a convenience function that provides a complete find-and-replace operation.
This function first resets this RegexMatcher. It then scans the input string looking for a match of the pattern. Input that is not part of the match is appended directly to the result string; the match is replaced in the result by the replacement string. The replacement string may contain references to captured groups.
The state of the matcher (the position at which a subsequent find() would begin) after completing a replaceFirst() is not specified. The RegexMatcher should be reset before doing additional find() operations.
| replacement | a string containing the replacement text. |
| dest | a mutable UText in which the results are placed. If nullptr, a new UText will be created (which may not be mutable). |
| status | a reference to a UErrorCode to receive any errors. |
| virtual UBool icu::final::requireEnd | ( | ) | const [virtual] |
Return true the most recent match succeeded and additional input could cause it to fail.
If this method returns false and a match was found, then more input might change the match but the match won't be lost. If a match was not found, then requireEnd has no meaning.
| static UBool icu::final::resemblesPattern | ( | const UnicodeString & | pattern, |
| int32_t | pos | ||
| ) | [static] |
Return true if the given position, in the given pattern, appears to be the start of a UnicodeSet pattern.
| void icu::final::reset | ( | ) | [virtual] |
Resets the iterator so that one can start again from the beginning.
Reimplemented from icu::SearchIterator.
| void icu::final::reset | ( | ) | [virtual] |
| void icu::final::reset | ( | void | ) | [virtual] |
Resets the cursor to the beginning of the string.
Reimplemented from icu::SearchIterator.
| void icu::final::reset | ( | const UnicodeSet & | set | ) |
Sets this iterator to visit the elements of the given set and resets it to the start of that set.
The iterator is valid only so long as set is valid.
| set | the set to iterate over. |
| void icu::final::reset | ( | ) | [virtual] |
Resets this iterator to the start of the set.
Reimplemented from icu::SearchIterator.
| virtual void icu::final::reset | ( | ) | [override, virtual] |
Reset the iteration.
Search will begin at the start of the text string if a forward iteration is initiated before a backwards iteration. Otherwise if a backwards iteration is initiated before a forwards iteration, the search will begin at the end of the text string.
Reimplemented from icu::SearchIterator.
| virtual RegexMatcher& icu::final::reset | ( | ) | [virtual] |
Resets this matcher.
The effect is to remove any memory of previous matches, and to cause subsequent find() operations to begin at the beginning of the input string.
Reimplemented from icu::SearchIterator.
| virtual RegexMatcher& icu::final::reset | ( | int64_t | index, |
| UErrorCode & | status | ||
| ) | [virtual] |
Resets this matcher, and set the current input position.
The effect is to remove any memory of previous matches, and to cause subsequent find() operations to begin at the specified (native) position in the input string.
The matcher's region is reset to its default, which is the entire input string.
An alternative to this function is to set a match region beginning at the desired index.
| virtual RegexMatcher& icu::final::reset | ( | const UnicodeString & | input | ) | [virtual] |
Resets this matcher with a new input string.
This allows instances of RegexMatcher to be reused, which is more efficient than creating a new RegexMatcher for each input string to be processed.
| input | The new string on which subsequent pattern matches will operate. The matcher retains a reference to the callers string, and operates directly on that. Ownership of the string remains with the caller. Because no copy of the string is made, it is essential that the caller not delete the string until after regexp operations on it are done. Note that while a reset on the matcher with an input string that is then modified across/during matcher operations may be supported currently for UnicodeString, this was not originally intended behavior, and support for this is not guaranteed in upcoming versions of ICU. |
| virtual RegexMatcher& icu::final::reset | ( | UText * | input | ) | [virtual] |
Resets this matcher with a new input string.
This allows instances of RegexMatcher to be reused, which is more efficient than creating a new RegexMatcher for each input string to be processed.
| input | The new string on which subsequent pattern matches will operate. The matcher makes a shallow clone of the given text; ownership of the original string remains with the caller. Because no deep copy of the text is made, it is essential that the caller not modify the string until after regexp operations on it are done. |
| void icu::final::resetPreserveRegion | ( | ) |
This API is for internal use only.
| virtual UnicodeSet& icu::final::retain | ( | UChar32 | start, |
| UChar32 | end | ||
| ) | [virtual] |
Retain only the elements in this set that are contained in the specified range.
If start > end then an empty range is retained, leaving the set empty. This is equivalent to a boolean logic AND, or a set INTERSECTION. A frozen set will not be modified.
| start | first character, inclusive, of range |
| end | last character, inclusive, of range |
Retain the specified character from this set if it is present.
A frozen set will not be modified.
| c | the character (code point) |
| UnicodeSet& icu::final::retain | ( | const UnicodeString & | s | ) |
Retains only the specified string from this set if it is present.
Upon return this set will be empty if it did not contain s, or will only contain s if it did contain s. A frozen set will not be modified.
| s | the source string |
| UnicodeSet& icu::final::retainAll | ( | const UnicodeString & | s | ) |
Retains EACH of the characters in this string.
Note: "ch" == {"c", "h"} A frozen set will not be modified.
| s | the source string |
| virtual UnicodeSet& icu::final::retainAll | ( | const UnicodeSet & | c | ) | [virtual] |
Retains only the elements in this set that are contained in the specified set.
In other words, removes from this set all of its elements that are not contained in the specified set. This operation effectively modifies this set so that its value is the intersection of the two sets. A frozen set will not be modified.
| c | set that defines which elements this set will retain. |
| icu::final::RuleBasedCollator | ( | const UnicodeString & | rules, |
| UErrorCode & | status | ||
| ) |
RuleBasedCollator constructor.
This takes the table rules and builds a collation table out of them. Please see RuleBasedCollator class description for more details on the collation rule syntax.
| rules | the collation rules to build the collation table from. |
| status | reporting a success or an error. |
| icu::final::RuleBasedCollator | ( | const UnicodeString & | rules, |
| ECollationStrength | collationStrength, | ||
| UErrorCode & | status | ||
| ) |
RuleBasedCollator constructor.
This takes the table rules and builds a collation table out of them. Please see RuleBasedCollator class description for more details on the collation rule syntax.
| rules | the collation rules to build the collation table from. |
| collationStrength | strength for comparison |
| status | reporting a success or an error. |
| icu::final::RuleBasedCollator | ( | const UnicodeString & | rules, |
| UColAttributeValue | decompositionMode, | ||
| UErrorCode & | status | ||
| ) |
RuleBasedCollator constructor.
This takes the table rules and builds a collation table out of them. Please see RuleBasedCollator class description for more details on the collation rule syntax.
| rules | the collation rules to build the collation table from. |
| decompositionMode | the normalisation mode |
| status | reporting a success or an error. |
| icu::final::RuleBasedCollator | ( | const UnicodeString & | rules, |
| ECollationStrength | collationStrength, | ||
| UColAttributeValue | decompositionMode, | ||
| UErrorCode & | status | ||
| ) |
RuleBasedCollator constructor.
This takes the table rules and builds a collation table out of them. Please see RuleBasedCollator class description for more details on the collation rule syntax.
| rules | the collation rules to build the collation table from. |
| collationStrength | strength for comparison |
| decompositionMode | the normalisation mode |
| status | reporting a success or an error. |
| icu::final::RuleBasedCollator | ( | const UnicodeString & | rules, |
| UParseError & | parseError, | ||
| UnicodeString & | reason, | ||
| UErrorCode & | errorCode | ||
| ) |
| icu::final::RuleBasedCollator | ( | const RuleBasedCollator & | other | ) |
| icu::final::RuleBasedCollator | ( | const uint8_t * | bin, |
| int32_t | length, | ||
| const RuleBasedCollator * | base, | ||
| UErrorCode & | status | ||
| ) |
Opens a collator from a collator binary image created using cloneBinary.
Binary image used in instantiation of the collator remains owned by the user and should stay around for the lifetime of the collator. The API also takes a base collator which must be the root collator.
| bin | binary image owned by the user and required through the lifetime of the collator |
| length | size of the image. If negative, the API will try to figure out the length of the image |
| base | Base collator, for lookup of untailored characters. Must be the root collator, must not be nullptr. The base is required to be present through the lifetime of the collator. |
| status | for catching errors |
| icu::final::RuleBasedCollator | ( | ) |
Only for use in ucol_openRules().
| virtual StringSearch* icu::final::safeClone | ( | ) | const [override, virtual] |
Returns a copy of StringSearch with the same behavior, and iterating over the same text, as this one.
Note that all data will be replicated, except for the user-specified collator and the breakiterator.
Reimplemented from icu::Collator.
| static int32_t icu::final::secondaryOrder | ( | int32_t | order | ) | [inline, static] |
Gets the secondary order of a collation order.
| order | the collation order |
| int32_t icu::final::serialize | ( | uint16_t * | dest, |
| int32_t | destCapacity, | ||
| UErrorCode & | ec | ||
| ) | const |
Serializes this set into an array of 16-bit integers.
Serialization (currently) only records the characters in the set; multicharacter strings are ignored.
The array has following format (each line is one 16-bit integer):
length = (n+2*m) | (m!=0?0x8000:0) bmpLength = n; present if m!=0 bmp[0] bmp[1] ... bmp[n-1] supp-high[0] supp-low[0] supp-high[1] supp-low[1] ... supp-high[m-1] supp-low[m-1]
The array starts with a header. After the header are n bmp code points, then m supplementary code points. Either n or m or both may be zero. n+2*m is always <= 0x7FFF.
If there are no supplementary characters (if m==0) then the header is one 16-bit integer, 'length', with value n.
If there are supplementary characters (if m!=0) then the header is two 16-bit integers. The first, 'length', has value (n+2*m)|0x8000. The second, 'bmpLength', has value n.
After the header the code points are stored in ascending order. Supplementary code points are stored as most significant 16 bits followed by least significant 16 bits.
| dest | pointer to buffer of destCapacity 16-bit integers. May be nullptr only if destCapacity is zero. |
| destCapacity | size of dest, or zero. Must not be negative. |
| ec | error code. Will be set to U_INDEX_OUTOFBOUNDS_ERROR if n+2*m > 0x7FFF. Will be set to U_BUFFER_OVERFLOW_ERROR if n+2*m+(m!=0?2:1) > destCapacity. |
| UnicodeSet& icu::final::set | ( | UChar32 | start, |
| UChar32 | end | ||
| ) |
Make this object represent the range `start - end`.
If `start > end` then this object is set to an empty range. A frozen set will not be modified.
| start | first character in the set, inclusive |
| end | last character in the set, inclusive |
| void icu::final::setAmPmStrings | ( | const UnicodeString * | ampms, |
| int32_t | count | ||
| ) |
Sets ampm strings.
For example: "AM" and "PM".
| ampms | the new ampm strings. (not adopted; caller retains ownership) |
| count | Filled in with length of the array. |
| virtual void icu::final::setAttribute | ( | UColAttribute | attr, |
| UColAttributeValue | value, | ||
| UErrorCode & | status | ||
| ) | [override, virtual] |
Universal attribute setter.
| attr | attribute type |
| value | attribute value |
| status | to indicate whether the operation went on smoothly or there were errors |
Implements icu::Collator.
| void icu::final::setCollator | ( | RuleBasedCollator * | coll, |
| UErrorCode & | status | ||
| ) |
Sets the collator used for the language rules.
User retains the ownership of this collator, thus the responsibility of deletion lies with the user. The iterator's position will not be changed by this method.
| coll | collator |
| status | for errors if any |
| void icu::final::setEraNames | ( | const UnicodeString * | eraNames, |
| int32_t | count | ||
| ) |
Sets era name strings.
For example: "Anno Domini" and "Before Christ".
| eraNames | Array of era name strings (DateFormatSymbols retains ownership.) |
| count | Filled in with length of the array. |
| void icu::final::setEras | ( | const UnicodeString * | eras, |
| int32_t | count | ||
| ) |
Sets abbreviated era strings.
For example: "AD" and "BC".
| eras | Array of era strings (DateFormatSymbols retains ownership.) |
| count | Filled in with length of the array. |
| void icu::final::setFallbackIntervalPattern | ( | const UnicodeString & | fallbackPattern, |
| UErrorCode & | status | ||
| ) |
Re-set the fallback interval pattern.
In construction, default fallback pattern is set as "{0} - {1}". And constructor taking locale as parameter will set the fallback pattern as what defined in the locale resource file.
This method provides a way for user to replace the fallback pattern.
| fallbackPattern | fall-back interval pattern. |
| status | output param set to success/failure code on exit |
| virtual void icu::final::setFindProgressCallback | ( | URegexFindProgressCallback * | callback, |
| const void * | context, | ||
| UErrorCode & | status | ||
| ) | [virtual] |
Set a progress callback function for use with find operations on this Matcher.
During find operations, the callback will be invoked after each return from a match attempt, giving the application the opportunity to terminate a long-running find operation.
| callback | A pointer to the user-supplied callback function. |
| context | User context pointer. The value supplied at the time the callback function is set will be saved and passed to the callback each time that it is called. |
| status | A reference to a UErrorCode to receive any errors. |
| void icu::final::setIntervalPattern | ( | const UnicodeString & | skeleton, |
| UCalendarDateFields | lrgDiffCalUnit, | ||
| const UnicodeString & | intervalPattern, | ||
| UErrorCode & | status | ||
| ) |
Provides a way for client to build interval patterns.
User could construct DateIntervalInfo by providing a list of skeletons and their patterns.
For example:
UErrorCode status = U_ZERO_ERROR; DateIntervalInfo dIntervalInfo = new DateIntervalInfo(); dIntervalInfo->setFallbackIntervalPattern("{0} ~ {1}"); dIntervalInfo->setIntervalPattern("yMd", UCAL_YEAR, "'from' yyyy-M-d 'to' yyyy-M-d", status); dIntervalInfo->setIntervalPattern("yMMMd", UCAL_MONTH, "'from' yyyy MMM d 'to' MMM d", status); dIntervalInfo->setIntervalPattern("yMMMd", UCAL_DAY, "yyyy MMM d-d", status, status);
Restriction: Currently, users can only set interval patterns when the following calendar fields are different: ERA, YEAR, MONTH, DATE, DAY_OF_MONTH, DAY_OF_WEEK, AM_PM, HOUR, HOUR_OF_DAY, MINUTE, SECOND and MILLISECOND. Interval patterns when other calendar fields are different are not supported.
| skeleton | the skeleton on which interval pattern based |
| lrgDiffCalUnit | the largest different calendar unit. |
| intervalPattern | the interval pattern on the largest different calendar unit. For example, if lrgDiffCalUnit is "year", the interval pattern for en_US when year is different could be "'from' yyyy 'to' yyyy". |
| status | output param set to success/failure code on exit |
| virtual void icu::final::setLocales | ( | const Locale & | requestedLocale, |
| const Locale & | validLocale, | ||
| const Locale & | actualLocale | ||
| ) | [override, protected, virtual] |
Used internally by registration to define the requested and valid locales.
| requestedLocale | the requested locale |
| validLocale | the valid locale |
| actualLocale | the actual locale |
Reimplemented from icu::Collator.
| void icu::final::setLocalPatternChars | ( | const UnicodeString & | newLocalPatternChars | ) |
Sets localized date-time pattern characters.
For example: 'u', 't', etc.
| newLocalPatternChars | the new localized date-time pattern characters. |
| virtual void icu::final::setMatchCallback | ( | URegexMatchCallback * | callback, |
| const void * | context, | ||
| UErrorCode & | status | ||
| ) | [virtual] |
Set a callback function for use with this Matcher.
During matching operations the function will be called periodically, giving the application the opportunity to terminate a long-running match.
| callback | A pointer to the user-supplied callback function. |
| context | User context pointer. The value supplied at the time the callback function is set will be saved and passed to the callback each time that it is called. |
| status | A reference to a UErrorCode to receive any errors. |
| virtual Collator& icu::final::setMaxVariable | ( | UColReorderCode | group, |
| UErrorCode & | errorCode | ||
| ) | [override, virtual] |
Sets the variable top to the top of the specified reordering group.
The variable top determines the highest-sorting character which is affected by UCOL_ALTERNATE_HANDLING. If that attribute is set to UCOL_NON_IGNORABLE, then the variable top has no effect.
| group | one of UCOL_REORDER_CODE_SPACE, UCOL_REORDER_CODE_PUNCTUATION, UCOL_REORDER_CODE_SYMBOL, UCOL_REORDER_CODE_CURRENCY; or UCOL_REORDER_CODE_DEFAULT to restore the default max variable group |
| errorCode | Standard ICU error code. Its input value must pass the U_SUCCESS() test, or else the function returns immediately. Check for U_FAILURE() on output or use with function chaining. (See User Guide for details.) |
Reimplemented from icu::Collator.
| void icu::final::setMonths | ( | const UnicodeString * | months, |
| int32_t | count | ||
| ) |
Sets month strings.
For example: "January", "February", etc.
| months | the new month strings. (not adopted; caller retains ownership) |
| count | Filled in with length of the array. |
| void icu::final::setMonths | ( | const UnicodeString * | months, |
| int32_t | count, | ||
| DtContextType | context, | ||
| DtWidthType | width | ||
| ) |
Sets month strings by width and context.
For example: "January", "February", etc.
| months | The new month strings. (not adopted; caller retains ownership) |
| count | Filled in with length of the array. |
| context | The formatting context, either FORMAT or STANDALONE |
| width | The width of returned strings, either WIDE, ABBREVIATED, or NARROW. |
| void icu::final::setNarrowEras | ( | const UnicodeString * | narrowEras, |
| int32_t | count | ||
| ) |
Sets narrow era strings.
For example: "A" and "B".
| narrowEras | Array of narrow era strings (DateFormatSymbols retains ownership.) |
| count | Filled in with length of the array. |
| void icu::final::setOffset | ( | int32_t | newOffset, |
| UErrorCode & | status | ||
| ) | [virtual] |
Sets the offset of the currently processed character in the source string.
| newOffset | the new offset. |
| status | the error code status. |
Implements icu::SearchIterator.
| virtual void icu::final::setOffset | ( | int32_t | position, |
| UErrorCode & | status | ||
| ) | [override, virtual] |
Sets the index to point to the given position, and clears any state that's affected.
This method takes the argument index and sets the position in the text string accordingly without checking if the index is pointing to a valid starting point to begin searching.
| position | within the text to be set. If position is less than or greater than the text range for searching, an U_INDEX_OUTOFBOUNDS_ERROR will be returned |
| status | for errors if it occurs |
Implements icu::SearchIterator.
| void icu::final::setPattern | ( | const UnicodeString & | pattern, |
| UErrorCode & | status | ||
| ) |
Sets the pattern used for matching.
The iterator's position will not be changed by this method.
| pattern | search pattern to be found |
| status | for errors if any. If the pattern length is 0 then an U_ILLEGAL_ARGUMENT_ERROR is returned. |
| void icu::final::setQuarters | ( | const UnicodeString * | quarters, |
| int32_t | count, | ||
| DtContextType | context, | ||
| DtWidthType | width | ||
| ) |
Sets quarter strings by width and context.
For example: "1st Quarter", "2nd Quarter", etc.
| quarters | The new quarter strings. (not adopted; caller retains ownership) |
| count | Filled in with length of the array. |
| context | The formatting context, either FORMAT or STANDALONE |
| width | The width of returned strings, either WIDE, ABBREVIATED, or NARROW. |
| virtual void icu::final::setReorderCodes | ( | const int32_t * | reorderCodes, |
| int32_t | reorderCodesLength, | ||
| UErrorCode & | status | ||
| ) | [override, virtual] |
Sets the ordering of scripts for this collator.
| reorderCodes | An array of script codes in the new order. This can be nullptr if the length is also set to 0. An empty array will clear any reordering codes on the collator. |
| reorderCodesLength | The length of reorderCodes. |
| status | error code |
Reimplemented from icu::Collator.
| void icu::final::setShortMonths | ( | const UnicodeString * | shortMonths, |
| int32_t | count | ||
| ) |
Sets short month strings.
For example: "Jan", "Feb", etc.
| count | Filled in with length of the array. |
| shortMonths | the new short month strings. (not adopted; caller retains ownership) |
| void icu::final::setShortWeekdays | ( | const UnicodeString * | abbrevWeekdays, |
| int32_t | count | ||
| ) |
Sets abbreviated weekday strings.
For example: "Sun", "Mon", etc. (Note: The method name is misleading; it does not set the CLDR-style "short" weekday strings, e.g. "Su", "Mo", etc.)
| abbrevWeekdays | the new abbreviated weekday strings. (not adopted; caller retains ownership) |
| count | Filled in with length of the array. |
| void icu::final::setSource | ( | const UnicodeString & | newSource, |
| UErrorCode & | status | ||
| ) |
Set a new source for this iterator.
Allows object reuse.
| newSource | the source string to iterate against. This allows the same iterator to be used while changing the source string, saving object creation. |
| status | Fill-in parameter which receives the status of this operation. |
| virtual void icu::final::setStackLimit | ( | int32_t | limit, |
| UErrorCode & | status | ||
| ) | [virtual] |
Set the amount of heap storage available for use by the match backtracking stack.
The matcher is also reset, discarding any results from previous matches.
ICU uses a backtracking regular expression engine, with the backtrack stack maintained on the heap. This function sets the limit to the amount of memory that can be used for this purpose. A backtracking stack overflow will result in an error from the match operation that caused it.
A limit is desirable because a malicious or poorly designed pattern can use excessive memory, potentially crashing the process. A limit is enabled by default.
| limit | The maximum size, in bytes, of the matching backtrack stack. A value of zero means no limit. The limit must be greater or equal to zero. |
| status | A reference to a UErrorCode to receive any errors. |
| void icu::final::setText | ( | const UnicodeString & | str, |
| UErrorCode & | status | ||
| ) | [virtual] |
Sets the source string.
| str | the source string. |
| status | the error code status. |
Reimplemented from icu::SearchIterator.
| void icu::final::setText | ( | CharacterIterator & | str, |
| UErrorCode & | status | ||
| ) | [virtual] |
Sets the source string.
| str | the source character iterator. |
| status | the error code status. |
Reimplemented from icu::SearchIterator.
| virtual void icu::final::setText | ( | const UnicodeString & | text, |
| UErrorCode & | status | ||
| ) | [override, virtual] |
Set the target text to be searched.
Text iteration will hence begin at the start of the text string. This method is useful if you want to re-use an iterator to search for the same pattern within a different body of text.
| text | text string to be searched |
| status | for errors if any. If the text length is 0 then an U_ILLEGAL_ARGUMENT_ERROR is returned. |
Reimplemented from icu::SearchIterator.
| virtual void icu::final::setText | ( | CharacterIterator & | text, |
| UErrorCode & | status | ||
| ) | [override, virtual] |
Set the target text to be searched.
Text iteration will hence begin at the start of the text string. This method is useful if you want to re-use an iterator to search for the same pattern within a different body of text. Note: No parsing of the text within the CharacterIterator will be done during searching for this version. The block of text in CharacterIterator will be used as it is.
| text | text string to be searched |
| status | for errors if any. If the text length is 0 then an U_ILLEGAL_ARGUMENT_ERROR is returned. |
Reimplemented from icu::SearchIterator.
| virtual void icu::final::setTimeLimit | ( | int32_t | limit, |
| UErrorCode & | status | ||
| ) | [virtual] |
Set a processing time limit for match operations with this Matcher.
Some patterns, when matching certain strings, can run in exponential time. For practical purposes, the match operation may appear to be in an infinite loop. When a limit is set a match operation will fail with an error if the limit is exceeded.
The units of the limit are steps of the match engine. Correspondence with actual processor time will depend on the speed of the processor and the details of the specific pattern, but will typically be on the order of milliseconds.
By default, the matching time is not limited.
| limit | The limit value, or 0 for no limit. |
| status | A reference to a UErrorCode to receive any errors. |
| void icu::final::setTimeSeparatorString | ( | const UnicodeString & | newTimeSeparator | ) |
Sets the time separator string.
For example: ":".
| newTimeSeparator | the new time separator string. |
| void icu::final::setToBogus | ( | ) |
Make this UnicodeSet object invalid.
The string will test true with isBogus().
A bogus set has no value. It is different from an empty set. It can be used to indicate that no set value is available.
This utility function is used throughout the UnicodeSet implementation to indicate that a UnicodeSet operation failed, and may be used in other functions, especially but not exclusively when such functions do not take a UErrorCode for simplicity.
| void icu::final::setTrace | ( | UBool | state | ) |
setTrace Debug function, enable/disable tracing of the matching engine.
For internal ICU development use only. DO NO USE!!!!
| virtual uint32_t icu::final::setVariableTop | ( | const char16_t * | varTop, |
| int32_t | len, | ||
| UErrorCode & | status | ||
| ) | [override, virtual] |
Sets the variable top to the primary weight of the specified string.
Beginning with ICU 53, the variable top is pinned to the top of one of the supported reordering groups, and it must not be beyond the last of those groups. See setMaxVariable().
| varTop | one or more (if contraction) char16_ts to which the variable top should be set |
| len | length of variable top string. If -1 it is considered to be zero terminated. |
| status | error code. If error code is set, the return value is undefined. Errors set by this function are: U_CE_NOT_FOUND_ERROR if more than one character was passed and there is no such contraction U_ILLEGAL_ARGUMENT_ERROR if the variable top is beyond the last reordering group supported by setMaxVariable() |
Implements icu::Collator.
| virtual uint32_t icu::final::setVariableTop | ( | const UnicodeString & | varTop, |
| UErrorCode & | status | ||
| ) | [override, virtual] |
Sets the variable top to the primary weight of the specified string.
Beginning with ICU 53, the variable top is pinned to the top of one of the supported reordering groups, and it must not be beyond the last of those groups. See setMaxVariable().
| varTop | a UnicodeString size 1 or more (if contraction) of char16_ts to which the variable top should be set |
| status | error code. If error code is set, the return value is undefined. Errors set by this function are: U_CE_NOT_FOUND_ERROR if more than one character was passed and there is no such contraction U_ILLEGAL_ARGUMENT_ERROR if the variable top is beyond the last reordering group supported by setMaxVariable() |
Implements icu::Collator.
| virtual void icu::final::setVariableTop | ( | uint32_t | varTop, |
| UErrorCode & | status | ||
| ) | [override, virtual] |
Sets the variable top to the specified primary weight.
Beginning with ICU 53, the variable top is pinned to the top of one of the supported reordering groups, and it must not be beyond the last of those groups. See setMaxVariable().
| varTop | primary weight, as returned by setVariableTop or ucol_getVariableTop |
| status | error code |
Implements icu::Collator.
| void icu::final::setWeekdays | ( | const UnicodeString * | weekdays, |
| int32_t | count | ||
| ) |
Sets wide weekday strings.
For example: "Sunday", "Monday", etc.
| weekdays | the new weekday strings. (not adopted; caller retains ownership) |
| count | Filled in with length of the array. |
| void icu::final::setWeekdays | ( | const UnicodeString * | weekdays, |
| int32_t | count, | ||
| DtContextType | context, | ||
| DtWidthType | width | ||
| ) |
Sets weekday strings by width and context.
For example: "Sunday", "Monday", etc.
| weekdays | The new weekday strings. (not adopted; caller retains ownership) |
| count | Filled in with length of the array. |
| context | The formatting context, either FORMAT or STANDALONE |
| width | The width of returned strings, either WIDE, ABBREVIATED, SHORT, or NARROW |
| void icu::final::setYearNames | ( | const UnicodeString * | yearNames, |
| int32_t | count, | ||
| DtContextType | context, | ||
| DtWidthType | width | ||
| ) |
Sets cyclic year name strings by width and context.
For example: "jia-zi", "yi-chou", etc.
| yearNames | The new cyclic year name strings (not adopted; caller retains ownership). |
| count | The length of the array. |
| context | The usage context: FORMAT, STANDALONE (currently only FORMAT is supported). |
| width | The name width: WIDE, ABBREVIATED, NARROW (currently only ABBREVIATED is supported). |
| void icu::final::setZodiacNames | ( | const UnicodeString * | zodiacNames, |
| int32_t | count, | ||
| DtContextType | context, | ||
| DtWidthType | width | ||
| ) |
Sets calendar zodiac name strings by width and context.
For example: "Rat", "Ox", "Tiger", etc.
| zodiacNames | The new zodiac name strings (not adopted; caller retains ownership). |
| count | The length of the array. |
| context | The usage context: FORMAT, STANDALONE (currently only FORMAT is supported). |
| width | The name width: WIDE, ABBREVIATED, NARROW (currently only ABBREVIATED is supported). |
| void icu::final::setZoneStrings | ( | const UnicodeString *const * | strings, |
| int32_t | rowCount, | ||
| int32_t | columnCount | ||
| ) |
Sets timezone strings.
These strings are stored in a 2-dimensional array.
Note: SimpleDateFormat no longer use the zone strings stored in a DateFormatSymbols. Therefore, the time zone strings set by this method have no effects in an instance of SimpleDateFormat for formatting time zones.
| strings | The timezone strings as a 2-d array to be copied. (not adopted; caller retains ownership) |
| rowCount | The number of rows (count of first index). |
| columnCount | The number of columns (count of second index). |
| icu::final::SimpleFormatter | ( | ) | [inline] |
| icu::final::SimpleFormatter | ( | const UnicodeString & | pattern, |
| UErrorCode & | errorCode | ||
| ) | [inline] |
Constructs a formatter from the pattern string.
| pattern | The pattern string. |
| errorCode | ICU error code in/out parameter. Must fulfill U_SUCCESS before the function call. Set to U_ILLEGAL_ARGUMENT_ERROR for bad argument syntax. |
Definition at line 79 of file simpleformatter.h.
| icu::final::SimpleFormatter | ( | const UnicodeString & | pattern, |
| int32_t | min, | ||
| int32_t | max, | ||
| UErrorCode & | errorCode | ||
| ) | [inline] |
Constructs a formatter from the pattern string.
The number of arguments checked against the given limits is the highest argument number plus one, not the number of occurrences of arguments.
| pattern | The pattern string. |
| min | The pattern must have at least this many arguments. |
| max | The pattern must have at most this many arguments. |
| errorCode | ICU error code in/out parameter. Must fulfill U_SUCCESS before the function call. Set to U_ILLEGAL_ARGUMENT_ERROR for bad argument syntax and too few or too many arguments. |
Definition at line 97 of file simpleformatter.h.
| icu::final::SimpleFormatter | ( | const SimpleFormatter & | other | ) | [inline] |
| virtual int32_t icu::final::size | ( | void | ) | const [virtual] |
Returns the number of elements in this set (its cardinality).
Note than the elements of a set may include both individual codepoints and strings.
This is slower than getRangeCount() because it counts the code points of all ranges.
| UnicodeSetIterator& icu::final::skipToStrings | ( | ) | [inline] |
Skips over the remaining code points/ranges, if any.
A following call to next() or nextRange() will yield a string, if there is one. No-op if next() would return false, or if it would yield a string anyway.
Definition at line 176 of file usetiter.h.
| int32_t icu::final::span | ( | const char16_t * | s, |
| int32_t | length, | ||
| USetSpanCondition | spanCondition | ||
| ) | const |
Returns the length of the initial substring of the input string which consists only of characters and strings that are contained in this set (USET_SPAN_CONTAINED, USET_SPAN_SIMPLE), or only of characters and strings that are not contained in this set (USET_SPAN_NOT_CONTAINED).
See USetSpanCondition for details. Similar to the strspn() C library function. Unpaired surrogates are treated according to contains() of their surrogate code points. This function works faster with a frozen set and with a non-negative string length argument.
| s | start of the string |
| length | of the string; can be -1 for NUL-terminated |
| spanCondition | specifies the containment condition |
| int32_t icu::final::span | ( | const UnicodeString & | s, |
| int32_t | start, | ||
| USetSpanCondition | spanCondition | ||
| ) | const [inline] |
Returns the end of the substring of the input string according to the USetSpanCondition.
Same as start+span(s.getBuffer()+start, s.length()-start, spanCondition) after pinning start to 0<=start<=s.length().
| s | the string |
| start | the start index in the string for the span operation |
| spanCondition | specifies the containment condition |
| int32_t icu::final::spanBack | ( | const char16_t * | s, |
| int32_t | length, | ||
| USetSpanCondition | spanCondition | ||
| ) | const |
Returns the start of the trailing substring of the input string which consists only of characters and strings that are contained in this set (USET_SPAN_CONTAINED, USET_SPAN_SIMPLE), or only of characters and strings that are not contained in this set (USET_SPAN_NOT_CONTAINED).
See USetSpanCondition for details. Unpaired surrogates are treated according to contains() of their surrogate code points. This function works faster with a frozen set and with a non-negative string length argument.
| s | start of the string |
| length | of the string; can be -1 for NUL-terminated |
| spanCondition | specifies the containment condition |
| int32_t icu::final::spanBack | ( | const UnicodeString & | s, |
| int32_t | limit, | ||
| USetSpanCondition | spanCondition | ||
| ) | const [inline] |
Returns the start of the substring of the input string according to the USetSpanCondition.
Same as spanBack(s.getBuffer(), limit, spanCondition) after pinning limit to 0<=end<=s.length().
| s | the string |
| limit | the exclusive-end index in the string for the span operation (use s.length() or INT32_MAX for spanning back from the end of the string) |
| spanCondition | specifies the containment condition |
| int32_t icu::final::spanBackUTF8 | ( | const char * | s, |
| int32_t | length, | ||
| USetSpanCondition | spanCondition | ||
| ) | const |
Returns the start of the trailing substring of the input string which consists only of characters and strings that are contained in this set (USET_SPAN_CONTAINED, USET_SPAN_SIMPLE), or only of characters and strings that are not contained in this set (USET_SPAN_NOT_CONTAINED).
See USetSpanCondition for details. Malformed byte sequences are treated according to contains(0xfffd). This function works faster with a frozen set and with a non-negative string length argument.
| s | start of the string (UTF-8) |
| length | of the string; can be -1 for NUL-terminated |
| spanCondition | specifies the containment condition |
| int32_t icu::final::spanUTF8 | ( | const char * | s, |
| int32_t | length, | ||
| USetSpanCondition | spanCondition | ||
| ) | const |
Returns the length of the initial substring of the input string which consists only of characters and strings that are contained in this set (USET_SPAN_CONTAINED, USET_SPAN_SIMPLE), or only of characters and strings that are not contained in this set (USET_SPAN_NOT_CONTAINED).
See USetSpanCondition for details. Similar to the strspn() C library function. Malformed byte sequences are treated according to contains(0xfffd). This function works faster with a frozen set and with a non-negative string length argument.
| s | start of the string (UTF-8) |
| length | of the string; can be -1 for NUL-terminated |
| spanCondition | specifies the containment condition |
| virtual int32_t icu::final::split | ( | const UnicodeString & | input, |
| UnicodeString | dest[], | ||
| int32_t | destCapacity, | ||
| UErrorCode & | status | ||
| ) | const [virtual] |
Split a string into fields.
Somewhat like split() from Perl or Java. Pattern matches identify delimiters that separate the input into fields. The input data between the delimiters becomes the fields themselves.
If the delimiter pattern includes capture groups, the captured text will also appear in the destination array of output strings, interspersed with the fields. This is similar to Perl, but differs from Java, which ignores the presence of capture groups in the pattern.
Trailing empty fields will always be returned, assuming sufficient destination capacity. This differs from the default behavior for Java and Perl where trailing empty fields are not returned.
The number of strings produced by the split operation is returned. This count includes the strings from capture groups in the delimiter pattern. This behavior differs from Java, which ignores capture groups.
For the best performance on split() operations, RegexMatcher::split is preferable to this function
| input | The string to be split into fields. The field delimiters match the pattern (in the "this" object) |
| dest | An array of UnicodeStrings to receive the results of the split. This is an array of actual UnicodeString objects, not an array of pointers to strings. Local (stack based) arrays can work well here. |
| destCapacity | The number of elements in the destination array. If the number of fields found is less than destCapacity, the extra strings in the destination array are not altered. If the number of destination strings is less than the number of fields, the trailing part of the input string, including any field delimiters, is placed in the last destination string. |
| status | A reference to a UErrorCode to receive any errors. |
| virtual int32_t icu::final::split | ( | UText * | input, |
| UText * | dest[], | ||
| int32_t | destCapacity, | ||
| UErrorCode & | status | ||
| ) | const [virtual] |
Split a string into fields.
Somewhat like split() from Perl or Java. Pattern matches identify delimiters that separate the input into fields. The input data between the delimiters becomes the fields themselves.
If the delimiter pattern includes capture groups, the captured text will also appear in the destination array of output strings, interspersed with the fields. This is similar to Perl, but differs from Java, which ignores the presence of capture groups in the pattern.
Trailing empty fields will always be returned, assuming sufficient destination capacity. This differs from the default behavior for Java and Perl where trailing empty fields are not returned.
The number of strings produced by the split operation is returned. This count includes the strings from capture groups in the delimiter pattern. This behavior differs from Java, which ignores capture groups.
For the best performance on split() operations, `RegexMatcher::split()` is preferable to this function
| input | The string to be split into fields. The field delimiters match the pattern (in the "this" object) |
| dest | An array of mutable UText structs to receive the results of the split. If a field is nullptr, a new UText is allocated to contain the results for that field. This new UText is not guaranteed to be mutable. |
| destCapacity | The number of elements in the destination array. If the number of fields found is less than destCapacity, the extra strings in the destination array are not altered. If the number of destination strings is less than the number of fields, the trailing part of the input string, including any field delimiters, is placed in the last destination string. |
| status | A reference to a UErrorCode to receive any errors. |
| virtual int32_t icu::final::split | ( | const UnicodeString & | input, |
| UnicodeString | dest[], | ||
| int32_t | destCapacity, | ||
| UErrorCode & | status | ||
| ) | [virtual] |
Split a string into fields.
Somewhat like split() from Perl. The pattern matches identify delimiters that separate the input into fields. The input data between the matches becomes the fields themselves.
| input | The string to be split into fields. The field delimiters match the pattern (in the "this" object). This matcher will be reset to this input string. |
| dest | An array of UnicodeStrings to receive the results of the split. This is an array of actual UnicodeString objects, not an array of pointers to strings. Local (stack based) arrays can work well here. |
| destCapacity | The number of elements in the destination array. If the number of fields found is less than destCapacity, the extra strings in the destination array are not altered. If the number of destination strings is less than the number of fields, the trailing part of the input string, including any field delimiters, is placed in the last destination string. |
| status | A reference to a UErrorCode to receive any errors. |
| virtual int32_t icu::final::split | ( | UText * | input, |
| UText * | dest[], | ||
| int32_t | destCapacity, | ||
| UErrorCode & | status | ||
| ) | [virtual] |
Split a string into fields.
Somewhat like split() from Perl. The pattern matches identify delimiters that separate the input into fields. The input data between the matches becomes the fields themselves.
| input | The string to be split into fields. The field delimiters match the pattern (in the "this" object). This matcher will be reset to this input string. |
| dest | An array of mutable UText structs to receive the results of the split. If a field is nullptr, a new UText is allocated to contain the results for that field. This new UText is not guaranteed to be mutable. |
| destCapacity | The number of elements in the destination array. If the number of fields found is less than destCapacity, the extra strings in the destination array are not altered. If the number of destination strings is less than the number of fields, the trailing part of the input string, including any field delimiters, is placed in the last destination string. |
| status | A reference to a UErrorCode to receive any errors. |
| virtual int32_t icu::final::start | ( | UErrorCode & | status | ) | const [virtual] |
Returns the index in the input string of the start of the text matched during the previous match operation.
| status | a reference to a UErrorCode to receive any errors. |
| virtual int32_t icu::final::start | ( | int32_t | group, |
| UErrorCode & | status | ||
| ) | const [virtual] |
Returns the index in the input string of the start of the text matched by the specified capture group during the previous match operation.
Return -1 if the capture group exists in the pattern, but was not part of the last match.
| group | the capture group number |
| status | A reference to a UErrorCode to receive any errors. Possible errors are U_REGEX_INVALID_STATE if no match has been attempted or the last match failed, and U_INDEX_OUTOFBOUNDS_ERROR for a bad capture group number |
| virtual int64_t icu::final::start64 | ( | UErrorCode & | status | ) | const [virtual] |
Returns the index in the input string of the start of the text matched during the previous match operation.
| status | a reference to a UErrorCode to receive any errors. |
| virtual int64_t icu::final::start64 | ( | int32_t | group, |
| UErrorCode & | status | ||
| ) | const [virtual] |
Returns the index in the input string of the start of the text matched by the specified capture group during the previous match operation.
Return -1 if the capture group exists in the pattern, but was not part of the last match.
| group | the capture group number. |
| status | A reference to a UErrorCode to receive any errors. Possible errors are U_REGEX_INVALID_STATE if no match has been attempted or the last match failed, and U_INDEX_OUTOFBOUNDS_ERROR for a bad capture group number. |
| int32_t icu::final::strengthOrder | ( | int32_t | order | ) | const |
Gets the comparison order in the desired strength.
Ignore the other differences.
| order | The order value |
| icu::final::StringSearch | ( | const UnicodeString & | pattern, |
| const UnicodeString & | text, | ||
| const Locale & | locale, | ||
| BreakIterator * | breakiter, | ||
| UErrorCode & | status | ||
| ) |
Creating a StringSearch instance using the argument locale language rule set.
A collator will be created in the process, which will be owned by this instance and will be deleted during destruction
| pattern | The text for which this object will search. |
| text | The text in which to search for the pattern. |
| locale | A locale which defines the language-sensitive comparison rules used to determine whether text in the pattern and target matches. |
| breakiter | A BreakIterator object used to constrain the matches that are found. Matches whose start and end indices in the target text are not boundaries as determined by the BreakIterator are ignored. If this behavior is not desired, nullptr can be passed in instead. |
| status | for errors if any. If pattern or text is nullptr, or if either the length of pattern or text is 0 then an U_ILLEGAL_ARGUMENT_ERROR is returned. |
| icu::final::StringSearch | ( | const UnicodeString & | pattern, |
| const UnicodeString & | text, | ||
| RuleBasedCollator * | coll, | ||
| BreakIterator * | breakiter, | ||
| UErrorCode & | status | ||
| ) |
Creating a StringSearch instance using the argument collator language rule set.
Note, user retains the ownership of this collator, it does not get destroyed during this instance's destruction.
| pattern | The text for which this object will search. |
| text | The text in which to search for the pattern. |
| coll | A RuleBasedCollator object which defines the language-sensitive comparison rules used to determine whether text in the pattern and target matches. User is responsible for the clearing of this object. |
| breakiter | A BreakIterator object used to constrain the matches that are found. Matches whose start and end indices in the target text are not boundaries as determined by the BreakIterator are ignored. If this behavior is not desired, nullptr can be passed in instead. |
| status | for errors if any. If either the length of pattern or text is 0 then an U_ILLEGAL_ARGUMENT_ERROR is returned. |
| icu::final::StringSearch | ( | const UnicodeString & | pattern, |
| CharacterIterator & | text, | ||
| const Locale & | locale, | ||
| BreakIterator * | breakiter, | ||
| UErrorCode & | status | ||
| ) |
Creating a StringSearch instance using the argument locale language rule set.
A collator will be created in the process, which will be owned by this instance and will be deleted during destruction
Note: No parsing of the text within the CharacterIterator will be done during searching for this version. The block of text in CharacterIterator will be used as it is.
| pattern | The text for which this object will search. |
| text | The text iterator in which to search for the pattern. |
| locale | A locale which defines the language-sensitive comparison rules used to determine whether text in the pattern and target matches. User is responsible for the clearing of this object. |
| breakiter | A BreakIterator object used to constrain the matches that are found. Matches whose start and end indices in the target text are not boundaries as determined by the BreakIterator are ignored. If this behavior is not desired, nullptr can be passed in instead. |
| status | for errors if any. If either the length of pattern or text is 0 then an U_ILLEGAL_ARGUMENT_ERROR is returned. |
| icu::final::StringSearch | ( | const UnicodeString & | pattern, |
| CharacterIterator & | text, | ||
| RuleBasedCollator * | coll, | ||
| BreakIterator * | breakiter, | ||
| UErrorCode & | status | ||
| ) |
Creating a StringSearch instance using the argument collator language rule set.
Note, user retains the ownership of this collator, it does not get destroyed during this instance's destruction.
Note: No parsing of the text within the CharacterIterator will be done during searching for this version. The block of text in CharacterIterator will be used as it is.
| pattern | The text for which this object will search. |
| text | The text in which to search for the pattern. |
| coll | A RuleBasedCollator object which defines the language-sensitive comparison rules used to determine whether text in the pattern and target matches. User is responsible for the clearing of this object. |
| breakiter | A BreakIterator object used to constrain the matches that are found. Matches whose start and end indices in the target text are not boundaries as determined by the BreakIterator are ignored. If this behavior is not desired, nullptr can be passed in instead. |
| status | for errors if any. If either the length of pattern or text is 0 then an U_ILLEGAL_ARGUMENT_ERROR is returned. |
| icu::final::StringSearch | ( | const StringSearch & | that | ) |
Copy constructor that creates a StringSearch instance with the same behavior, and iterating over the same text.
| that | StringSearch instance to be copied. |
| static int32_t icu::final::tertiaryOrder | ( | int32_t | order | ) | [inline, static] |
Gets the tertiary order of a collation order.
| order | the collation order |
| static int32_t icu::final::toLower | ( | const char * | locale, |
| uint32_t | options, | ||
| const char16_t * | src, | ||
| int32_t | srcLength, | ||
| char16_t * | dest, | ||
| int32_t | destCapacity, | ||
| Edits * | edits, | ||
| UErrorCode & | errorCode | ||
| ) | [static] |
Lowercases a UTF-16 string and optionally records edits.
Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original. The source string and the destination buffer must not overlap.
| locale | The locale ID. ("" = root locale, nullptr = default locale.) |
| options | Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET. |
| src | The original string. |
| srcLength | The length of the original string. If -1, then src must be NUL-terminated. |
| dest | A buffer for the result string. The result will be NUL-terminated if the buffer is large enough. The contents is undefined in case of failure. |
| destCapacity | The size of the buffer (number of char16_ts). If it is 0, then dest may be nullptr and the function will only return the length of the result without writing any of the result string. |
| edits | Records edits for index mapping, working with styled text, and getting only changes (if any). The Edits contents is undefined if any error occurs. This function calls edits->reset() first unless options includes U_EDITS_NO_RESET. edits can be nullptr. |
| errorCode | Reference to an in/out error code value which must not indicate a failure before the function call. |
| virtual UnicodeString& icu::final::toPattern | ( | UnicodeString & | result, |
| UBool | escapeUnprintable = false |
||
| ) | const [override, virtual] |
Returns a string representation of this set.
If the result of calling this function is passed to a UnicodeSet constructor, it will produce another set that is equal to this one. A frozen set will not be modified.
| result | the string to receive the rules. Previous contents will be deleted. |
| escapeUnprintable | if true then convert unprintable character to their hex escape representations, \uxxxx or \Uxxxxxxxx. Unprintable characters are those other than U+000A, U+0020..U+007E. |
Implements icu::UnicodeMatcher.
| static int32_t icu::final::toTitle | ( | const char * | locale, |
| uint32_t | options, | ||
| BreakIterator * | iter, | ||
| const char16_t * | src, | ||
| int32_t | srcLength, | ||
| char16_t * | dest, | ||
| int32_t | destCapacity, | ||
| Edits * | edits, | ||
| UErrorCode & | errorCode | ||
| ) | [static] |
Titlecases a UTF-16 string and optionally records edits.
Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original. The source string and the destination buffer must not overlap.
Titlecasing uses a break iterator to find the first characters of words that are to be titlecased. It titlecases those characters and lowercases all others. (This can be modified with options bits.)
| locale | The locale ID. ("" = root locale, nullptr = default locale.) |
| options | Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT, U_EDITS_NO_RESET, U_TITLECASE_NO_LOWERCASE, U_TITLECASE_NO_BREAK_ADJUSTMENT, U_TITLECASE_ADJUST_TO_CASED, U_TITLECASE_WHOLE_STRING, U_TITLECASE_SENTENCES. |
| iter | A break iterator to find the first characters of words that are to be titlecased. It is set to the source string (setText()) and used one or more times for iteration (first() and next()). If nullptr, then a word break iterator for the locale is used (or something equivalent). |
| src | The original string. |
| srcLength | The length of the original string. If -1, then src must be NUL-terminated. |
| dest | A buffer for the result string. The result will be NUL-terminated if the buffer is large enough. The contents is undefined in case of failure. |
| destCapacity | The size of the buffer (number of char16_ts). If it is 0, then dest may be nullptr and the function will only return the length of the result without writing any of the result string. |
| edits | Records edits for index mapping, working with styled text, and getting only changes (if any). The Edits contents is undefined if any error occurs. This function calls edits->reset() first unless options includes U_EDITS_NO_RESET. edits can be nullptr. |
| errorCode | Reference to an in/out error code value which must not indicate a failure before the function call. |
| UCollationElements* icu::final::toUCollationElements | ( | ) | [inline] |
| const UCollationElements* icu::final::toUCollationElements | ( | ) | const [inline] |
| static int32_t icu::final::toUpper | ( | const char * | locale, |
| uint32_t | options, | ||
| const char16_t * | src, | ||
| int32_t | srcLength, | ||
| char16_t * | dest, | ||
| int32_t | destCapacity, | ||
| Edits * | edits, | ||
| UErrorCode & | errorCode | ||
| ) | [static] |
Uppercases a UTF-16 string and optionally records edits.
Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original. The source string and the destination buffer must not overlap.
| locale | The locale ID. ("" = root locale, nullptr = default locale.) |
| options | Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET. |
| src | The original string. |
| srcLength | The length of the original string. If -1, then src must be NUL-terminated. |
| dest | A buffer for the result string. The result will be NUL-terminated if the buffer is large enough. The contents is undefined in case of failure. |
| destCapacity | The size of the buffer (number of char16_ts). If it is 0, then dest may be nullptr and the function will only return the length of the result without writing any of the result string. |
| edits | Records edits for index mapping, working with styled text, and getting only changes (if any). The Edits contents is undefined if any error occurs. This function calls edits->reset() first unless options includes U_EDITS_NO_RESET. edits can be nullptr. |
| errorCode | Reference to an in/out error code value which must not indicate a failure before the function call. |
| USet* icu::final::toUSet | ( | ) | [inline] |
Produce a USet * pointer for this UnicodeSet.
USet is the plain C type for UnicodeSet
| const USet* icu::final::toUSet | ( | ) | const [inline] |
Produce a const USet * pointer for this UnicodeSet.
USet is the plain C type for UnicodeSet
Constructs an empty set.
| icu::final::UnicodeSet | ( | UChar32 | start, |
| UChar32 | end | ||
| ) |
Constructs a set containing the given range.
If end < start then an empty set is created.
| start | first character, inclusive, of range |
| end | last character, inclusive, of range |
| icu::final::UnicodeSet | ( | const uint16_t | buffer[], |
| int32_t | bufferLen, | ||
| ESerialization | serialization, | ||
| UErrorCode & | status | ||
| ) |
Constructs a set from the output of serialize().
| buffer | the 16 bit array |
| bufferLen | the original length returned from serialize() |
| serialization | the value 'kSerialized' |
| status | error code |
| icu::final::UnicodeSet | ( | const UnicodeString & | pattern, |
| UErrorCode & | status | ||
| ) |
Constructs a set from the given pattern.
See the class description for the syntax of the pattern language.
| pattern | a string specifying what characters are in the set |
| status | returns U_ILLEGAL_ARGUMENT_ERROR if the pattern contains a syntax error. |
| icu::final::UnicodeSet | ( | const UnicodeString & | pattern, |
| uint32_t | options, | ||
| const SymbolTable * | symbols, | ||
| UErrorCode & | status | ||
| ) |
Constructs a set from the given pattern.
See the class description for the syntax of the pattern language.
| pattern | a string specifying what characters are in the set |
| options | bitmask for options to apply to the pattern. Valid options are USET_IGNORE_SPACE and at most one of USET_CASE_INSENSITIVE, USET_ADD_CASE_MAPPINGS, USET_SIMPLE_CASE_INSENSITIVE. These case options are mutually exclusive. |
| symbols | a symbol table mapping variable names to values and stand-in characters to UnicodeSets; may be nullptr |
| status | returns U_ILLEGAL_ARGUMENT_ERROR if the pattern contains a syntax error. |
| icu::final::UnicodeSet | ( | const UnicodeString & | pattern, |
| ParsePosition & | pos, | ||
| uint32_t | options, | ||
| const SymbolTable * | symbols, | ||
| UErrorCode & | status | ||
| ) |
Constructs a set from the given pattern.
See the class description for the syntax of the pattern language.
| pattern | a string specifying what characters are in the set |
| pos | on input, the position in pattern at which to start parsing. On output, the position after the last character parsed. |
| options | bitmask for options to apply to the pattern. Valid options are USET_IGNORE_SPACE and at most one of USET_CASE_INSENSITIVE, USET_ADD_CASE_MAPPINGS, USET_SIMPLE_CASE_INSENSITIVE. These case options are mutually exclusive. |
| symbols | a symbol table mapping variable names to values and stand-in characters to UnicodeSets; may be nullptr |
| status | input-output error code |
| icu::final::UnicodeSet | ( | const UnicodeSet & | o | ) |
Constructs a set that is identical to the given UnicodeSet.
| icu::final::UnicodeSetIterator | ( | const UnicodeSet & | set | ) |
Create an iterator over the given set.
The iterator is valid only so long as set is valid.
| set | set to iterate over |
| icu::final::UnicodeSetIterator | ( | ) |
Create an iterator over nothing.
next() and nextRange() return false. This is a convenience constructor allowing the target to be set later.
| virtual RegexMatcher& icu::final::useAnchoringBounds | ( | UBool | b | ) | [virtual] |
Set whether this matcher is using Anchoring Bounds for its region.
With anchoring bounds, pattern anchors such as ^ and $ will match at the start and end of the region. Without Anchoring Bounds, anchors will only match at the positions they would in the complete text.
Anchoring Bounds are the default for regions.
| b | true if to enable anchoring bounds; false to disable them. |
| virtual RegexMatcher& icu::final::useTransparentBounds | ( | UBool | b | ) | [virtual] |
Sets the transparency of region bounds for this matcher.
Invoking this function with an argument of true will set this matcher to use transparent bounds. If the boolean argument is false, then opaque bounds will be used.
Using transparent bounds, the boundaries of this matcher's region are transparent to lookahead, lookbehind, and boundary matching constructs. Those constructs can see text beyond the boundaries of the region while checking for a match.
With opaque bounds, no text outside of the matcher's region is visible to lookahead, lookbehind, and boundary matching constructs.
By default, a matcher uses opaque bounds.
| b | true for transparent bounds; false for opaque bounds |
| static void icu::final::utf8Fold | ( | uint32_t | options, |
| StringPiece | src, | ||
| ByteSink & | sink, | ||
| Edits * | edits, | ||
| UErrorCode & | errorCode | ||
| ) | [static] |
Case-folds a UTF-8 string and optionally records edits.
Case folding is locale-independent and not context-sensitive, but there is an option for whether to include or exclude mappings for dotted I and dotless i that are marked with 'T' in CaseFolding.txt.
The result may be longer or shorter than the original.
| options | Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET. |
| src | The original string. |
| sink | A ByteSink to which the result string is written. sink.Flush() is called at the end. |
| edits | Records edits for index mapping, working with styled text, and getting only changes (if any). The Edits contents is undefined if any error occurs. This function calls edits->reset() first unless options includes U_EDITS_NO_RESET. edits can be nullptr. |
| errorCode | Reference to an in/out error code value which must not indicate a failure before the function call. |
| static int32_t icu::final::utf8Fold | ( | uint32_t | options, |
| const char * | src, | ||
| int32_t | srcLength, | ||
| char * | dest, | ||
| int32_t | destCapacity, | ||
| Edits * | edits, | ||
| UErrorCode & | errorCode | ||
| ) | [static] |
Case-folds a UTF-8 string and optionally records edits.
Case folding is locale-independent and not context-sensitive, but there is an option for whether to include or exclude mappings for dotted I and dotless i that are marked with 'T' in CaseFolding.txt.
The result may be longer or shorter than the original. The source string and the destination buffer must not overlap.
| options | Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT, U_EDITS_NO_RESET, U_FOLD_CASE_DEFAULT, U_FOLD_CASE_EXCLUDE_SPECIAL_I. |
| src | The original string. |
| srcLength | The length of the original string. If -1, then src must be NUL-terminated. |
| dest | A buffer for the result string. The result will be NUL-terminated if the buffer is large enough. The contents is undefined in case of failure. |
| destCapacity | The size of the buffer (number of bytes). If it is 0, then dest may be nullptr and the function will only return the length of the result without writing any of the result string. |
| edits | Records edits for index mapping, working with styled text, and getting only changes (if any). The Edits contents is undefined if any error occurs. This function calls edits->reset() first unless options includes U_EDITS_NO_RESET. edits can be nullptr. |
| errorCode | Reference to an in/out error code value which must not indicate a failure before the function call. |
| static void icu::final::utf8ToLower | ( | const char * | locale, |
| uint32_t | options, | ||
| StringPiece | src, | ||
| ByteSink & | sink, | ||
| Edits * | edits, | ||
| UErrorCode & | errorCode | ||
| ) | [static] |
Lowercases a UTF-8 string and optionally records edits.
Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original.
| locale | The locale ID. ("" = root locale, nullptr = default locale.) |
| options | Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET. |
| src | The original string. |
| sink | A ByteSink to which the result string is written. sink.Flush() is called at the end. |
| edits | Records edits for index mapping, working with styled text, and getting only changes (if any). The Edits contents is undefined if any error occurs. This function calls edits->reset() first unless options includes U_EDITS_NO_RESET. edits can be nullptr. |
| errorCode | Reference to an in/out error code value which must not indicate a failure before the function call. |
| static int32_t icu::final::utf8ToLower | ( | const char * | locale, |
| uint32_t | options, | ||
| const char * | src, | ||
| int32_t | srcLength, | ||
| char * | dest, | ||
| int32_t | destCapacity, | ||
| Edits * | edits, | ||
| UErrorCode & | errorCode | ||
| ) | [static] |
Lowercases a UTF-8 string and optionally records edits.
Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original. The source string and the destination buffer must not overlap.
| locale | The locale ID. ("" = root locale, nullptr = default locale.) |
| options | Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET. |
| src | The original string. |
| srcLength | The length of the original string. If -1, then src must be NUL-terminated. |
| dest | A buffer for the result string. The result will be NUL-terminated if the buffer is large enough. The contents is undefined in case of failure. |
| destCapacity | The size of the buffer (number of bytes). If it is 0, then dest may be nullptr and the function will only return the length of the result without writing any of the result string. |
| edits | Records edits for index mapping, working with styled text, and getting only changes (if any). The Edits contents is undefined if any error occurs. This function calls edits->reset() first unless options includes U_EDITS_NO_RESET. edits can be nullptr. |
| errorCode | Reference to an in/out error code value which must not indicate a failure before the function call. |
| static void icu::final::utf8ToTitle | ( | const char * | locale, |
| uint32_t | options, | ||
| BreakIterator * | iter, | ||
| StringPiece | src, | ||
| ByteSink & | sink, | ||
| Edits * | edits, | ||
| UErrorCode & | errorCode | ||
| ) | [static] |
Titlecases a UTF-8 string and optionally records edits.
Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original.
Titlecasing uses a break iterator to find the first characters of words that are to be titlecased. It titlecases those characters and lowercases all others. (This can be modified with options bits.)
| locale | The locale ID. ("" = root locale, nullptr = default locale.) |
| options | Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT, U_EDITS_NO_RESET, U_TITLECASE_NO_LOWERCASE, U_TITLECASE_NO_BREAK_ADJUSTMENT, U_TITLECASE_ADJUST_TO_CASED, U_TITLECASE_WHOLE_STRING, U_TITLECASE_SENTENCES. |
| iter | A break iterator to find the first characters of words that are to be titlecased. It is set to the source string (setUText()) and used one or more times for iteration (first() and next()). If nullptr, then a word break iterator for the locale is used (or something equivalent). |
| src | The original string. |
| sink | A ByteSink to which the result string is written. sink.Flush() is called at the end. |
| edits | Records edits for index mapping, working with styled text, and getting only changes (if any). The Edits contents is undefined if any error occurs. This function calls edits->reset() first unless options includes U_EDITS_NO_RESET. edits can be nullptr. |
| errorCode | Reference to an in/out error code value which must not indicate a failure before the function call. |
| static int32_t icu::final::utf8ToTitle | ( | const char * | locale, |
| uint32_t | options, | ||
| BreakIterator * | iter, | ||
| const char * | src, | ||
| int32_t | srcLength, | ||
| char * | dest, | ||
| int32_t | destCapacity, | ||
| Edits * | edits, | ||
| UErrorCode & | errorCode | ||
| ) | [static] |
Titlecases a UTF-8 string and optionally records edits.
Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original. The source string and the destination buffer must not overlap.
Titlecasing uses a break iterator to find the first characters of words that are to be titlecased. It titlecases those characters and lowercases all others. (This can be modified with options bits.)
| locale | The locale ID. ("" = root locale, nullptr = default locale.) |
| options | Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT, U_EDITS_NO_RESET, U_TITLECASE_NO_LOWERCASE, U_TITLECASE_NO_BREAK_ADJUSTMENT, U_TITLECASE_ADJUST_TO_CASED, U_TITLECASE_WHOLE_STRING, U_TITLECASE_SENTENCES. |
| iter | A break iterator to find the first characters of words that are to be titlecased. It is set to the source string (setUText()) and used one or more times for iteration (first() and next()). If nullptr, then a word break iterator for the locale is used (or something equivalent). |
| src | The original string. |
| srcLength | The length of the original string. If -1, then src must be NUL-terminated. |
| dest | A buffer for the result string. The result will be NUL-terminated if the buffer is large enough. The contents is undefined in case of failure. |
| destCapacity | The size of the buffer (number of bytes). If it is 0, then dest may be nullptr and the function will only return the length of the result without writing any of the result string. |
| edits | Records edits for index mapping, working with styled text, and getting only changes (if any). The Edits contents is undefined if any error occurs. This function calls edits->reset() first unless options includes U_EDITS_NO_RESET. edits can be nullptr. |
| errorCode | Reference to an in/out error code value which must not indicate a failure before the function call. |
| static void icu::final::utf8ToUpper | ( | const char * | locale, |
| uint32_t | options, | ||
| StringPiece | src, | ||
| ByteSink & | sink, | ||
| Edits * | edits, | ||
| UErrorCode & | errorCode | ||
| ) | [static] |
Uppercases a UTF-8 string and optionally records edits.
Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original.
| locale | The locale ID. ("" = root locale, nullptr = default locale.) |
| options | Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET. |
| src | The original string. |
| sink | A ByteSink to which the result string is written. sink.Flush() is called at the end. |
| edits | Records edits for index mapping, working with styled text, and getting only changes (if any). The Edits contents is undefined if any error occurs. This function calls edits->reset() first unless options includes U_EDITS_NO_RESET. edits can be nullptr. |
| errorCode | Reference to an in/out error code value which must not indicate a failure before the function call. |
| static int32_t icu::final::utf8ToUpper | ( | const char * | locale, |
| uint32_t | options, | ||
| const char * | src, | ||
| int32_t | srcLength, | ||
| char * | dest, | ||
| int32_t | destCapacity, | ||
| Edits * | edits, | ||
| UErrorCode & | errorCode | ||
| ) | [static] |
Uppercases a UTF-8 string and optionally records edits.
Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original. The source string and the destination buffer must not overlap.
| locale | The locale ID. ("" = root locale, nullptr = default locale.) |
| options | Options bit set, usually 0. See U_OMIT_UNCHANGED_TEXT and U_EDITS_NO_RESET. |
| src | The original string. |
| srcLength | The length of the original string. If -1, then src must be NUL-terminated. |
| dest | A buffer for the result string. The result will be NUL-terminated if the buffer is large enough. The contents is undefined in case of failure. |
| destCapacity | The size of the buffer (number of bytes). If it is 0, then dest may be nullptr and the function will only return the length of the result without writing any of the result string. |
| edits | Records edits for index mapping, working with styled text, and getting only changes (if any). The Edits contents is undefined if any error occurs. This function calls edits->reset() first unless options includes U_EDITS_NO_RESET. edits can be nullptr. |
| errorCode | Reference to an in/out error code value which must not indicate a failure before the function call. |
friend class DateIntervalFormat [friend] |
DateIntervalFormat will need access to getBestSkeleton(), parseSkeleton(), enum IntervalPatternIndex, and calendarFieldToPatternIndex().
Instead of making above public, make DateIntervalFormat a friend of DateIntervalInfo.
Definition at line 341 of file dtitvinf.h.
const char16_t icu::final::ALTERNATE_TIME_SEPARATOR = 0x002e [static] |
This alternate time separator is always recognized when parsing.
Definition at line 436 of file dtfmtsym.h.
const char16_t icu::final::DEFAULT_TIME_SEPARATOR = 0x003a [static] |
This default time separator is used for formatting when the locale doesn't specify any time separator, and always recognized when parsing.
Definition at line 430 of file dtfmtsym.h.
1.7.6.1