Lines Matching full:set
22 * \brief C API: Unicode Set
62 * The resulting set is a superset of the input for the code points but
66 * the original set to their full case folding equivalents.
70 * an input character directly against the closure set.
72 * set with an incremental case folding of the string in question.
74 * The closure set will also contain single code points if the original
75 * set contained case-equivalent strings (like U+00DF for "ss" or "Ss" etc.).
78 * set contained the code point or a string.
89 * of each existing element in the set.
97 * the current character is contained vs. not contained in the set.
106 * - Using a complemented (inverted) set and the opposite span conditions
109 * When a set contains multi-code point strings, then these statements may not
110 * be true, depending on the strings in the set (for example, whether they
112 * For a set with strings:
113 * - The complement of the set contains the opposite set of code points,
114 * but the same set of strings.
115 * Therefore, complementing both the set and the span conditions
119 * because a set string may start before the later position.
123 * For example, with a set which contains the three strings "xy", "xya" and "ax",
130 * For example, with a set which contains the two strings "ab" and "ba",
141 * Similarly, set strings match only on code point boundaries,
144 * When processing UTF-8 strings, malformed set strings
152 * Continues a span() while there is no set element at the current position.
154 * Stops before the first set element (character or string).
158 * it returned consists only of characters that are not in the set,
165 * Spans the longest substring that is a concatenation of set elements (characters or strings).
169 * it returned consists only of set elements (characters or strings) that are in the set.
171 * If a set contains strings, then the span will be the longest substring for which there
172 * exists at least one non-overlapping concatenation of set elements (characters or strings).
173 * This is equivalent to a POSIX regular expression for <code>(OR of each set element)*</code>.
180 * Continues a span() while there is a set element at the current position.
185 * it returned consists only of set elements (characters or strings) that are in the set.
187 * If a set only contains single characters, then this is the same
190 * If a set contains strings, then the span will be the longest substring
191 * with a match at each position with the longest single set element (character or string).
209 * Enough for any single-code point set.
217 * A serialized form of a Unicode set. Limited manipulations are
218 * possible directly on a serialized set. See below.
223 * The serialized Unicode Set.
261 * then an empty set is created (same as using uset_openEmpty()).
272 * Creates a set from the given pattern. See the UnicodeSet class
274 * @param pattern a string specifying what characters are in the set
285 * Creates a set from the given pattern. See the UnicodeSet class
287 * @param pattern a string specifying what characters are in the set
303 * @param set the object to dispose of
307 uset_close(USet* set);
330 * If this set is frozen, then the clone will be frozen as well.
331 * Use uset_cloneAsThawed() for a mutable clone of a frozen set.
332 * @param set the original set
333 * @return the newly allocated copy of the set
338 uset_clone(const USet *set);
341 * Determines whether the set has been frozen (made immutable) or not.
343 * @param set the set
344 * @return TRUE/FALSE for whether the set has been frozen
350 uset_isFrozen(const USet *set);
353 * Freeze the set (make it immutable).
357 * Freezing the set may also make some operations faster, for example
359 * A frozen set will not be modified. (It remains frozen.)
360 * @param set the set
361 * @return the same set, now frozen
367 uset_freeze(USet *set);
370 * Clone the set and make the clone mutable.
372 * @param set the set
380 uset_cloneAsThawed(const USet *set);
384 * If <code>start > end</code> then this USet is set to an empty range.
385 * A frozen set will not be modified.
386 * @param set the object to set to the given range
387 * @param start first character in the set, inclusive
388 * @param end last character in the set, inclusive
392 uset_set(USet* set,
396 * Modifies the set to represent the set specified by the given
399 * <em>Empties the set passed before applying the pattern.</em>
400 * A frozen set will not be modified.
401 * @param set The set to which the pattern is to be applied.
402 * @param pattern A pointer to UChar string specifying what characters are in the set.
417 uset_applyPattern(USet *set,
423 * Modifies the set to contain those code points which have the given value
425 * u_getIntPropertyValue. Prior contents of this set are lost.
426 * A frozen set will not be modified.
428 * @param set the object to contain the code points defined by the property
445 uset_applyIntPropertyValue(USet* set,
449 * Modifies the set to contain those code points which have the
451 * set are lost.
452 * A frozen set will not be modified.
454 * @param set the object to contain the code points defined by the given
484 uset_applyPropertyAlias(USet* set,
503 * Returns a string representation of this set. If the result of
505 * will produce another set that is equal to this one.
506 * @param set the set
518 uset_toPattern(const USet* set,
525 * uset_contains(set, c) will return TRUE.
526 * A frozen set will not be modified.
527 * @param set the object to which to add the character
532 uset_add(USet* set, UChar32 c);
535 * Adds all of the elements in the specified set to this set if
537 * modifies this set so that its value is the <i>union</i> of the two
540 * A frozen set will not be modified.
542 * @param set the object to which to add the set
543 * @param additionalSet the source set whose elements are to be added to this set.
547 uset_addAll(USet* set, const USet *additionalSet);
551 * uset_contains(set, start, end) will return TRUE.
552 * A frozen set will not be modified.
553 * @param set the object to which to add the character
559 uset_addRange(USet* set, UChar32 start, UChar32 end);
563 * uset_containsString(set, str, strLen) will return TRUE.
564 * A frozen set will not be modified.
565 * @param set the object to which to add the character
571 uset_addString(USet* set, const UChar* str, int32_t strLen);
574 * Adds each of the characters in this string to the set. Thus "ch" => {"c", "h"}
575 * If this set already any particular character, it has no effect on that character.
576 * A frozen set will not be modified.
577 * @param set the object to which to add the character
583 uset_addAllCodePoints(USet* set, const UChar *str, int32_t strLen);
587 * uset_contains(set, c) will return FALSE.
588 * A frozen set will not be modified.
589 * @param set the object from which to remove the character
594 uset_remove(USet* set, UChar32 c);
598 * uset_contains(set, start, end) will return FALSE.
599 * A frozen set will not be modified.
600 * @param set the object to which to add the character
606 uset_removeRange(USet* set, UChar32 start, UChar32 end);
610 * uset_containsString(set, str, strLen) will return FALSE.
611 * A frozen set will not be modified.
612 * @param set the object to which to add the character
618 uset_removeString(USet* set, const UChar* str, int32_t strLen);
621 * Removes from this set all of its elements that are contained in the
622 * specified set. This operation effectively modifies this
623 * set so that its value is the <i>asymmetric set difference</i> of
625 * A frozen set will not be modified.
626 * @param set the object from which the elements are to be removed
628 * removed from this set
632 uset_removeAll(USet* set, const USet* removeSet);
635 * Retain only the elements in this set that are contained in the
637 * retained, leaving the set empty. This is equivalent to
638 * a boolean logic AND, or a set INTERSECTION.
639 * A frozen set will not be modified.
641 * @param set the object for which to retain only the specified range
643 * to this set.
645 * to this set.
649 uset_retain(USet* set, UChar32 start, UChar32 end);
652 * Retains only the elements in this set that are contained in the
653 * specified set. In other words, removes from this set all of
654 * its elements that are not contained in the specified set. This
655 * operation effectively modifies this set so that its value is
657 * A frozen set will not be modified.
659 * @param set the object on which to perform the retain
660 * @param retain set that defines which elements this set will retain
664 uset_retainAll(USet* set, const USet* retain);
669 * A frozen set will not be modified.
671 * @param set the object on which to perfrom the compact
675 uset_compact(USet* set);
678 * Inverts this set. This operation modifies this set so that
681 * A frozen set will not be modified.
682 * @param set the set
686 uset_complement(USet* set);
689 * Complements in this set all elements contained in the specified
690 * set. Any character in the other set will be removed if it is
691 * in this set, or will be added if it is not in this set.
692 * A frozen set will not be modified.
694 * @param set the set with which to complement
695 * @param complement set that defines which elements will be xor'ed
696 * from this set.
700 uset_complementAll(USet* set, const USet* complement);
703 * Removes all of the elements from this set. This set will be
705 * A frozen set will not be modified.
706 * @param set the set
710 uset_clear(USet* set);
713 * Close this set over the given attribute. For the attribute
714 * USET_CASE, the result is to modify this set so that:
716 * 1. For each character or string 'a' in this set, all strings or
718 * to this set.
720 * 2. For each string 'e' in the resulting set, if e !=
729 * A frozen set will not be modified.
731 * @param set the set
739 uset_closeOver(USet* set, int32_t attributes);
742 * Remove all strings from this set.
744 * @param set the set
748 uset_removeAllStrings(USet* set);
753 * @param set the set
754 * @return true if set is empty
758 uset_isEmpty(const USet* set);
762 * This function works faster with a frozen set.
763 * @param set the set
764 * @param c The codepoint to check for within the set
765 * @return true if set contains c
769 uset_contains(const USet* set, UChar32 c);
774 * @param set the set
777 * @return TRUE if set contains the range
781 uset_containsRange(const USet* set, UChar32 start, UChar32 end);
785 * @param set the set
788 * @return true if set contains str
792 uset_containsString(const USet* set, const UChar* str, int32_t strLen);
795 * Returns the index of the given character within this set, where
796 * the set is ordered by ascending code point. If the character
797 * is not in this set, return -1. The inverse of this method is
799 * @param set the set
805 uset_indexOf(const USet* set, UChar32 c);
808 * Returns the character at the given index within this set, where
809 * the set is ordered by ascending code point. If the index is
812 * @param set the set
818 uset_charAt(const USet* set, int32_t charIndex);
823 * @param set the set
825 * contained in set
829 uset_size(const USet* set);
832 * Returns the number of items in this set. An item is either a range
834 * @param set the set
836 * and/or strings contained in set
840 uset_getItemCount(const USet* set);
843 * Returns an item of this set. An item is either a range of
845 * @param set the set
847 * uset_getItemCount(set)-1
861 uset_getItem(const USet* set, int32_t itemIndex,
869 * @param set1 set to be checked for containment
870 * @param set2 set to be checked for containment
878 * Returns true if this set contains all the characters
881 * @param set set of characters to be checked for containment
888 uset_containsAllCodePoints(const USet* set, const UChar *str, int32_t strLen);
892 * of set2. It answers the question, 'Is set1 a disjoint set of set2?'
893 * @param set1 set to be checked for containment
894 * @param set2 set to be checked for containment
904 * @param set1 set to be checked for containment
905 * @param set2 set to be checked for containment
914 * consists only of characters and strings that are contained in this set
917 * in this set (USET_SPAN_NOT_CONTAINED).
921 * This function works faster with a frozen set and with a non-negative string length argument.
922 * @param set the set
932 uset_span(const USet *set, const UChar *s, int32_t length, USetSpanCondition spanCondition);
936 * consists only of characters and strings that are contained in this set
939 * in this set (USET_SPAN_NOT_CONTAINED).
942 * This function works faster with a frozen set and with a non-negative string length argument.
943 * @param set the set
953 uset_spanBack(const USet *set, const UChar *s, int32_t length, USetSpanCondition spanCondition);
957 * consists only of characters and strings that are contained in this set
960 * in this set (USET_SPAN_NOT_CONTAINED).
964 * This function works faster with a frozen set and with a non-negative string length argument.
965 * @param set the set
975 uset_spanUTF8(const USet *set, const char *s, int32_t length, USetSpanCondition spanCondition);
979 * consists only of characters and strings that are contained in this set
982 * in this set (USET_SPAN_NOT_CONTAINED).
985 * This function works faster with a frozen set and with a non-negative string length argument.
986 * @param set the set
996 uset_spanBackUTF8(const USet *set, const char *s, int32_t length, USetSpanCondition spanCondition);
1001 * @param set1 set to be checked for containment
1002 * @param set2 set to be checked for containment
1010 * Serialized set API
1014 * Serializes this set into an array of 16-bit integers. Serialization
1015 * (currently) only records the characters in the set; multicharacter
1050 * @param set the set
1054 * @param pErrorCode pointer to the error code. Will be set to
1055 * U_INDEX_OUTOFBOUNDS_ERROR if n+2*m > 0x7FFF. Will be set to
1063 uset_serialize(const USet* set, uint16_t* dest, int32_t destCapacity, UErrorCode* pErrorCode);
1066 * Given a serialized array, fill in the given serialized set object.
1077 * Set the USerializedSet to contain the given character (and nothing
1080 * @param c The codepoint to set
1089 * @param set the serialized set
1090 * @param c The codepoint to check for within the set
1091 * @return true if set contains c
1095 uset_serializedContains(const USerializedSet* set, UChar32 c);
1099 * the given serialized set. Ignores any strings contained in the
1100 * set.
1101 * @param set the serialized set
1103 * contained in set
1107 uset_getSerializedRangeCount(const USerializedSet* set);
1111 * set.
1112 * @param set the serialized set
1114 * uset_getSerializedRangeCount(set)-1
1123 uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex,