Lines Matching full:set
24 * \brief C API: Unicode Set
71 * The resulting set is a superset of the input for the code points but
75 * the original set to their full case folding equivalents.
79 * an input character directly against the closure set.
81 * set with an incremental case folding of the string in question.
83 * The closure set will also contain single code points if the original
84 * set contained case-equivalent strings (like U+00DF for "ss" or "Ss" etc.).
87 * set contained the code point or a string.
98 * of each existing element in the set.
106 * the current character is contained vs. not contained in the set.
115 * - Using a complemented (inverted) set and the opposite span conditions
118 * When a set contains multi-code point strings, then these statements may not
119 * be true, depending on the strings in the set (for example, whether they
121 * For a set with strings:
122 * - The complement of the set contains the opposite set of code points,
123 * but the same set of strings.
124 * Therefore, complementing both the set and the span conditions
128 * because a set string may start before the later position.
132 * For example, with a set which contains the three strings "xy", "xya" and "ax",
139 * For example, with a set which contains the two strings "ab" and "ba",
150 * Similarly, set strings match only on code point boundaries,
153 * When processing UTF-8 strings, malformed set strings
161 * Continues a span() while there is no set element at the current position.
163 * Stops before the first set element (character or string).
167 * it returned consists only of characters that are not in the set,
174 * Spans the longest substring that is a concatenation of set elements (characters or strings).
178 * it returned consists only of set elements (characters or strings) that are in the set.
180 * If a set contains strings, then the span will be the longest substring for which there
181 * exists at least one non-overlapping concatenation of set elements (characters or strings).
182 * This is equivalent to a POSIX regular expression for <code>(OR of each set element)*</code>.
189 * Continues a span() while there is a set element at the current position.
194 * it returned consists only of set elements (characters or strings) that are in the set.
196 * If a set only contains single characters, then this is the same
199 * If a set contains strings, then the span will be the longest substring
200 * with a match at each position with the longest single set element (character or string).
220 * Enough for any single-code point set.
228 * A serialized form of a Unicode set. Limited manipulations are
229 * possible directly on a serialized set. See below.
234 * The serialized Unicode Set.
272 * then an empty set is created (same as using uset_openEmpty()).
283 * Creates a set from the given pattern. See the UnicodeSet class
285 * @param pattern a string specifying what characters are in the set
296 * Creates a set from the given pattern. See the UnicodeSet class
298 * @param pattern a string specifying what characters are in the set
314 * @param set the object to dispose of
318 uset_close(USet* set);
341 * If this set is frozen, then the clone will be frozen as well.
342 * Use uset_cloneAsThawed() for a mutable clone of a frozen set.
343 * @param set the original set
344 * @return the newly allocated copy of the set
349 uset_clone(const USet *set);
352 * Determines whether the set has been frozen (made immutable) or not.
354 * @param set the set
355 * @return true/false for whether the set has been frozen
361 uset_isFrozen(const USet *set);
364 * Freeze the set (make it immutable).
368 * Freezing the set may also make some operations faster, for example
370 * A frozen set will not be modified. (It remains frozen.)
371 * @param set the set
372 * @return the same set, now frozen
378 uset_freeze(USet *set);
381 * Clone the set and make the clone mutable.
383 * @param set the set
391 uset_cloneAsThawed(const USet *set);
395 * If <code>start > end</code> then this USet is set to an empty range.
396 * A frozen set will not be modified.
397 * @param set the object to set to the given range
398 * @param start first character in the set, inclusive
399 * @param end last character in the set, inclusive
403 uset_set(USet* set,
407 * Modifies the set to represent the set specified by the given
410 * <em>Empties the set passed before applying the pattern.</em>
411 * A frozen set will not be modified.
412 * @param set The set to which the pattern is to be applied.
413 * @param pattern A pointer to UChar string specifying what characters are in the set.
428 uset_applyPattern(USet *set,
434 * Modifies the set to contain those code points which have the given value
436 * u_getIntPropertyValue. Prior contents of this set are lost.
437 * A frozen set will not be modified.
439 * @param set the object to contain the code points defined by the property
456 uset_applyIntPropertyValue(USet* set,
460 * Modifies the set to contain those code points which have the
462 * set are lost.
463 * A frozen set will not be modified.
465 * @param set the object to contain the code points defined by the given
495 uset_applyPropertyAlias(USet* set,
514 * Returns a string representation of this set. If the result of
516 * will produce another set that is equal to this one.
517 * @param set the set
529 uset_toPattern(const USet* set,
536 * uset_contains(set, c) will return true.
537 * A frozen set will not be modified.
538 * @param set the object to which to add the character
543 uset_add(USet* set, UChar32 c);
546 * Adds all of the elements in the specified set to this set if
548 * modifies this set so that its value is the <i>union</i> of the two
551 * A frozen set will not be modified.
553 * @param set the object to which to add the set
554 * @param additionalSet the source set whose elements are to be added to this set.
558 uset_addAll(USet* set, const USet *additionalSet);
562 * uset_contains(set, start, end) will return true.
563 * A frozen set will not be modified.
564 * @param set the object to which to add the character
570 uset_addRange(USet* set, UChar32 start, UChar32 end);
574 * uset_containsString(set, str, strLen) will return true.
575 * A frozen set will not be modified.
576 * @param set the object to which to add the character
582 uset_addString(USet* set, const UChar* str, int32_t strLen);
585 * Adds each of the characters in this string to the set. Thus "ch" => {"c", "h"}
586 * If this set already any particular character, it has no effect on that character.
587 * A frozen set will not be modified.
588 * @param set the object to which to add the character
594 uset_addAllCodePoints(USet* set, const UChar *str, int32_t strLen);
598 * uset_contains(set, c) will return false.
599 * A frozen set will not be modified.
600 * @param set the object from which to remove the character
605 uset_remove(USet* set, UChar32 c);
609 * uset_contains(set, start, end) will return false.
610 * A frozen set will not be modified.
611 * @param set the object to which to add the character
617 uset_removeRange(USet* set, UChar32 start, UChar32 end);
621 * uset_containsString(set, str, strLen) will return false.
622 * A frozen set will not be modified.
623 * @param set the object to which to add the character
629 uset_removeString(USet* set, const UChar* str, int32_t strLen);
632 * Removes from this set all of its elements that are contained in the
633 * specified set. This operation effectively modifies this
634 * set so that its value is the <i>asymmetric set difference</i> of
636 * A frozen set will not be modified.
637 * @param set the object from which the elements are to be removed
639 * removed from this set
643 uset_removeAll(USet* set, const USet* removeSet);
646 * Retain only the elements in this set that are contained in the
648 * retained, leaving the set empty. This is equivalent to
649 * a boolean logic AND, or a set INTERSECTION.
650 * A frozen set will not be modified.
652 * @param set the object for which to retain only the specified range
654 * to this set.
656 * to this set.
660 uset_retain(USet* set, UChar32 start, UChar32 end);
663 * Retains only the elements in this set that are contained in the
664 * specified set. In other words, removes from this set all of
665 * its elements that are not contained in the specified set. This
666 * operation effectively modifies this set so that its value is
668 * A frozen set will not be modified.
670 * @param set the object on which to perform the retain
671 * @param retain set that defines which elements this set will retain
675 uset_retainAll(USet* set, const USet* retain);
680 * A frozen set will not be modified.
682 * @param set the object on which to perfrom the compact
686 uset_compact(USet* set);
689 * Inverts this set. This operation modifies this set so that
692 * A frozen set will not be modified.
693 * @param set the set
697 uset_complement(USet* set);
700 * Complements in this set all elements contained in the specified
701 * set. Any character in the other set will be removed if it is
702 * in this set, or will be added if it is not in this set.
703 * A frozen set will not be modified.
705 * @param set the set with which to complement
706 * @param complement set that defines which elements will be xor'ed
707 * from this set.
711 uset_complementAll(USet* set, const USet* complement);
714 * Removes all of the elements from this set. This set will be
716 * A frozen set will not be modified.
717 * @param set the set
721 uset_clear(USet* set);
724 * Close this set over the given attribute. For the attribute
725 * USET_CASE, the result is to modify this set so that:
727 * 1. For each character or string 'a' in this set, all strings or
729 * to this set.
731 * 2. For each string 'e' in the resulting set, if e !=
740 * A frozen set will not be modified.
742 * @param set the set
750 uset_closeOver(USet* set, int32_t attributes);
753 * Remove all strings from this set.
755 * @param set the set
759 uset_removeAllStrings(USet* set);
764 * @param set the set
765 * @return true if set is empty
769 uset_isEmpty(const USet* set);
773 * This function works faster with a frozen set.
774 * @param set the set
775 * @param c The codepoint to check for within the set
776 * @return true if set contains c
780 uset_contains(const USet* set, UChar32 c);
785 * @param set the set
788 * @return true if set contains the range
792 uset_containsRange(const USet* set, UChar32 start, UChar32 end);
796 * @param set the set
799 * @return true if set contains str
803 uset_containsString(const USet* set, const UChar* str, int32_t strLen);
806 * Returns the index of the given character within this set, where
807 * the set is ordered by ascending code point. If the character
808 * is not in this set, return -1. The inverse of this method is
810 * @param set the set
816 uset_indexOf(const USet* set, UChar32 c);
819 * Returns the character at the given index within this set, where
820 * the set is ordered by ascending code point. If the index is
823 * @param set the set
829 uset_charAt(const USet* set, int32_t charIndex);
834 * @param set the set
836 * contained in set
840 uset_size(const USet* set);
843 * Returns the number of items in this set. An item is either a range
845 * @param set the set
847 * and/or strings contained in set
851 uset_getItemCount(const USet* set);
854 * Returns an item of this set. An item is either a range of
856 * @param set the set
858 * uset_getItemCount(set)-1
872 uset_getItem(const USet* set, int32_t itemIndex,
880 * @param set1 set to be checked for containment
881 * @param set2 set to be checked for containment
889 * Returns true if this set contains all the characters
892 * @param set set of characters to be checked for containment
899 uset_containsAllCodePoints(const USet* set, const UChar *str, int32_t strLen);
903 * of set2. It answers the question, 'Is set1 a disjoint set of set2?'
904 * @param set1 set to be checked for containment
905 * @param set2 set to be checked for containment
915 * @param set1 set to be checked for containment
916 * @param set2 set to be checked for containment
925 * consists only of characters and strings that are contained in this set
928 * in this set (USET_SPAN_NOT_CONTAINED).
932 * This function works faster with a frozen set and with a non-negative string length argument.
933 * @param set the set
943 uset_span(const USet *set, const UChar *s, int32_t length, USetSpanCondition spanCondition);
947 * consists only of characters and strings that are contained in this set
950 * in this set (USET_SPAN_NOT_CONTAINED).
953 * This function works faster with a frozen set and with a non-negative string length argument.
954 * @param set the set
964 uset_spanBack(const USet *set, const UChar *s, int32_t length, USetSpanCondition spanCondition);
968 * consists only of characters and strings that are contained in this set
971 * in this set (USET_SPAN_NOT_CONTAINED).
975 * This function works faster with a frozen set and with a non-negative string length argument.
976 * @param set the set
986 uset_spanUTF8(const USet *set, const char *s, int32_t length, USetSpanCondition spanCondition);
990 * consists only of characters and strings that are contained in this set
993 * in this set (USET_SPAN_NOT_CONTAINED).
996 * This function works faster with a frozen set and with a non-negative string length argument.
997 * @param set the set
1007 uset_spanBackUTF8(const USet *set, const char *s, int32_t length, USetSpanCondition spanCondition);
1012 * @param set1 set to be checked for containment
1013 * @param set2 set to be checked for containment
1021 * Serialized set API
1025 * Serializes this set into an array of 16-bit integers. Serialization
1026 * (currently) only records the characters in the set; multicharacter
1061 * @param set the set
1065 * @param pErrorCode pointer to the error code. Will be set to
1066 * U_INDEX_OUTOFBOUNDS_ERROR if n+2*m > 0x7FFF. Will be set to
1074 uset_serialize(const USet* set, uint16_t* dest, int32_t destCapacity, UErrorCode* pErrorCode);
1077 * Given a serialized array, fill in the given serialized set object.
1088 * Set the USerializedSet to contain the given character (and nothing
1091 * @param c The codepoint to set
1100 * @param set the serialized set
1101 * @param c The codepoint to check for within the set
1102 * @return true if set contains c
1106 uset_serializedContains(const USerializedSet* set, UChar32 c);
1110 * the given serialized set. Ignores any strings contained in the
1111 * set.
1112 * @param set the serialized set
1114 * contained in set
1118 uset_getSerializedRangeCount(const USerializedSet* set);
1122 * set.
1123 * @param set the serialized set
1125 * uset_getSerializedRangeCount(set)-1
1134 uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex,