Lines Matching full:set
24 * \brief C API: Unicode Set
64 * The resulting set is a superset of the input for the code points but
68 * the original set to their full case folding equivalents.
72 * an input character directly against the closure set.
74 * set with an incremental case folding of the string in question.
76 * The closure set will also contain single code points if the original
77 * set contained case-equivalent strings (like U+00DF for "ss" or "Ss" etc.).
80 * set contained the code point or a string.
91 * of each existing element in the set.
99 * the current character is contained vs. not contained in the set.
108 * - Using a complemented (inverted) set and the opposite span conditions
111 * When a set contains multi-code point strings, then these statements may not
112 * be true, depending on the strings in the set (for example, whether they
114 * For a set with strings:
115 * - The complement of the set contains the opposite set of code points,
116 * but the same set of strings.
117 * Therefore, complementing both the set and the span conditions
121 * because a set string may start before the later position.
125 * For example, with a set which contains the three strings "xy", "xya" and "ax",
132 * For example, with a set which contains the two strings "ab" and "ba",
143 * Similarly, set strings match only on code point boundaries,
146 * When processing UTF-8 strings, malformed set strings
154 * Continues a span() while there is no set element at the current position.
156 * Stops before the first set element (character or string).
160 * it returned consists only of characters that are not in the set,
167 * Spans the longest substring that is a concatenation of set elements (characters or strings).
171 * it returned consists only of set elements (characters or strings) that are in the set.
173 * If a set contains strings, then the span will be the longest substring for which there
174 * exists at least one non-overlapping concatenation of set elements (characters or strings).
175 * This is equivalent to a POSIX regular expression for <code>(OR of each set element)*</code>.
182 * Continues a span() while there is a set element at the current position.
187 * it returned consists only of set elements (characters or strings) that are in the set.
189 * If a set only contains single characters, then this is the same
192 * If a set contains strings, then the span will be the longest substring
193 * with a match at each position with the longest single set element (character or string).
213 * Enough for any single-code point set.
221 * A serialized form of a Unicode set. Limited manipulations are
222 * possible directly on a serialized set. See below.
227 * The serialized Unicode Set.
265 * then an empty set is created (same as using uset_openEmpty()).
276 * Creates a set from the given pattern. See the UnicodeSet class
278 * @param pattern a string specifying what characters are in the set
289 * Creates a set from the given pattern. See the UnicodeSet class
291 * @param pattern a string specifying what characters are in the set
307 * @param set the object to dispose of
311 uset_close(USet* set);
334 * If this set is frozen, then the clone will be frozen as well.
335 * Use uset_cloneAsThawed() for a mutable clone of a frozen set.
336 * @param set the original set
337 * @return the newly allocated copy of the set
342 uset_clone(const USet *set);
345 * Determines whether the set has been frozen (made immutable) or not.
347 * @param set the set
348 * @return TRUE/FALSE for whether the set has been frozen
354 uset_isFrozen(const USet *set);
357 * Freeze the set (make it immutable).
361 * Freezing the set may also make some operations faster, for example
363 * A frozen set will not be modified. (It remains frozen.)
364 * @param set the set
365 * @return the same set, now frozen
371 uset_freeze(USet *set);
374 * Clone the set and make the clone mutable.
376 * @param set the set
384 uset_cloneAsThawed(const USet *set);
388 * If <code>start > end</code> then this USet is set to an empty range.
389 * A frozen set will not be modified.
390 * @param set the object to set to the given range
391 * @param start first character in the set, inclusive
392 * @param end last character in the set, inclusive
396 uset_set(USet* set,
400 * Modifies the set to represent the set specified by the given
403 * <em>Empties the set passed before applying the pattern.</em>
404 * A frozen set will not be modified.
405 * @param set The set to which the pattern is to be applied.
406 * @param pattern A pointer to UChar string specifying what characters are in the set.
421 uset_applyPattern(USet *set,
427 * Modifies the set to contain those code points which have the given value
429 * u_getIntPropertyValue. Prior contents of this set are lost.
430 * A frozen set will not be modified.
432 * @param set the object to contain the code points defined by the property
449 uset_applyIntPropertyValue(USet* set,
453 * Modifies the set to contain those code points which have the
455 * set are lost.
456 * A frozen set will not be modified.
458 * @param set the object to contain the code points defined by the given
488 uset_applyPropertyAlias(USet* set,
507 * Returns a string representation of this set. If the result of
509 * will produce another set that is equal to this one.
510 * @param set the set
522 uset_toPattern(const USet* set,
529 * uset_contains(set, c) will return TRUE.
530 * A frozen set will not be modified.
531 * @param set the object to which to add the character
536 uset_add(USet* set, UChar32 c);
539 * Adds all of the elements in the specified set to this set if
541 * modifies this set so that its value is the <i>union</i> of the two
544 * A frozen set will not be modified.
546 * @param set the object to which to add the set
547 * @param additionalSet the source set whose elements are to be added to this set.
551 uset_addAll(USet* set, const USet *additionalSet);
555 * uset_contains(set, start, end) will return TRUE.
556 * A frozen set will not be modified.
557 * @param set the object to which to add the character
563 uset_addRange(USet* set, UChar32 start, UChar32 end);
567 * uset_containsString(set, str, strLen) will return TRUE.
568 * A frozen set will not be modified.
569 * @param set the object to which to add the character
575 uset_addString(USet* set, const UChar* str, int32_t strLen);
578 * Adds each of the characters in this string to the set. Thus "ch" => {"c", "h"}
579 * If this set already any particular character, it has no effect on that character.
580 * A frozen set will not be modified.
581 * @param set the object to which to add the character
587 uset_addAllCodePoints(USet* set, const UChar *str, int32_t strLen);
591 * uset_contains(set, c) will return FALSE.
592 * A frozen set will not be modified.
593 * @param set the object from which to remove the character
598 uset_remove(USet* set, UChar32 c);
602 * uset_contains(set, start, end) will return FALSE.
603 * A frozen set will not be modified.
604 * @param set the object to which to add the character
610 uset_removeRange(USet* set, UChar32 start, UChar32 end);
614 * uset_containsString(set, str, strLen) will return FALSE.
615 * A frozen set will not be modified.
616 * @param set the object to which to add the character
622 uset_removeString(USet* set, const UChar* str, int32_t strLen);
625 * Removes from this set all of its elements that are contained in the
626 * specified set. This operation effectively modifies this
627 * set so that its value is the <i>asymmetric set difference</i> of
629 * A frozen set will not be modified.
630 * @param set the object from which the elements are to be removed
632 * removed from this set
636 uset_removeAll(USet* set, const USet* removeSet);
639 * Retain only the elements in this set that are contained in the
641 * retained, leaving the set empty. This is equivalent to
642 * a boolean logic AND, or a set INTERSECTION.
643 * A frozen set will not be modified.
645 * @param set the object for which to retain only the specified range
647 * to this set.
649 * to this set.
653 uset_retain(USet* set, UChar32 start, UChar32 end);
656 * Retains only the elements in this set that are contained in the
657 * specified set. In other words, removes from this set all of
658 * its elements that are not contained in the specified set. This
659 * operation effectively modifies this set so that its value is
661 * A frozen set will not be modified.
663 * @param set the object on which to perform the retain
664 * @param retain set that defines which elements this set will retain
668 uset_retainAll(USet* set, const USet* retain);
673 * A frozen set will not be modified.
675 * @param set the object on which to perfrom the compact
679 uset_compact(USet* set);
682 * Inverts this set. This operation modifies this set so that
685 * A frozen set will not be modified.
686 * @param set the set
690 uset_complement(USet* set);
693 * Complements in this set all elements contained in the specified
694 * set. Any character in the other set will be removed if it is
695 * in this set, or will be added if it is not in this set.
696 * A frozen set will not be modified.
698 * @param set the set with which to complement
699 * @param complement set that defines which elements will be xor'ed
700 * from this set.
704 uset_complementAll(USet* set, const USet* complement);
707 * Removes all of the elements from this set. This set will be
709 * A frozen set will not be modified.
710 * @param set the set
714 uset_clear(USet* set);
717 * Close this set over the given attribute. For the attribute
718 * USET_CASE, the result is to modify this set so that:
720 * 1. For each character or string 'a' in this set, all strings or
722 * to this set.
724 * 2. For each string 'e' in the resulting set, if e !=
733 * A frozen set will not be modified.
735 * @param set the set
743 uset_closeOver(USet* set, int32_t attributes);
746 * Remove all strings from this set.
748 * @param set the set
752 uset_removeAllStrings(USet* set);
757 * @param set the set
758 * @return true if set is empty
762 uset_isEmpty(const USet* set);
766 * This function works faster with a frozen set.
767 * @param set the set
768 * @param c The codepoint to check for within the set
769 * @return true if set contains c
773 uset_contains(const USet* set, UChar32 c);
778 * @param set the set
781 * @return TRUE if set contains the range
785 uset_containsRange(const USet* set, UChar32 start, UChar32 end);
789 * @param set the set
792 * @return true if set contains str
796 uset_containsString(const USet* set, const UChar* str, int32_t strLen);
799 * Returns the index of the given character within this set, where
800 * the set is ordered by ascending code point. If the character
801 * is not in this set, return -1. The inverse of this method is
803 * @param set the set
809 uset_indexOf(const USet* set, UChar32 c);
812 * Returns the character at the given index within this set, where
813 * the set is ordered by ascending code point. If the index is
816 * @param set the set
822 uset_charAt(const USet* set, int32_t charIndex);
827 * @param set the set
829 * contained in set
833 uset_size(const USet* set);
836 * Returns the number of items in this set. An item is either a range
838 * @param set the set
840 * and/or strings contained in set
844 uset_getItemCount(const USet* set);
847 * Returns an item of this set. An item is either a range of
849 * @param set the set
851 * uset_getItemCount(set)-1
865 uset_getItem(const USet* set, int32_t itemIndex,
873 * @param set1 set to be checked for containment
874 * @param set2 set to be checked for containment
882 * Returns true if this set contains all the characters
885 * @param set set of characters to be checked for containment
892 uset_containsAllCodePoints(const USet* set, const UChar *str, int32_t strLen);
896 * of set2. It answers the question, 'Is set1 a disjoint set of set2?'
897 * @param set1 set to be checked for containment
898 * @param set2 set to be checked for containment
908 * @param set1 set to be checked for containment
909 * @param set2 set to be checked for containment
918 * consists only of characters and strings that are contained in this set
921 * in this set (USET_SPAN_NOT_CONTAINED).
925 * This function works faster with a frozen set and with a non-negative string length argument.
926 * @param set the set
936 uset_span(const USet *set, const UChar *s, int32_t length, USetSpanCondition spanCondition);
940 * consists only of characters and strings that are contained in this set
943 * in this set (USET_SPAN_NOT_CONTAINED).
946 * This function works faster with a frozen set and with a non-negative string length argument.
947 * @param set the set
957 uset_spanBack(const USet *set, const UChar *s, int32_t length, USetSpanCondition spanCondition);
961 * consists only of characters and strings that are contained in this set
964 * in this set (USET_SPAN_NOT_CONTAINED).
968 * This function works faster with a frozen set and with a non-negative string length argument.
969 * @param set the set
979 uset_spanUTF8(const USet *set, const char *s, int32_t length, USetSpanCondition spanCondition);
983 * consists only of characters and strings that are contained in this set
986 * in this set (USET_SPAN_NOT_CONTAINED).
989 * This function works faster with a frozen set and with a non-negative string length argument.
990 * @param set the set
1000 uset_spanBackUTF8(const USet *set, const char *s, int32_t length, USetSpanCondition spanCondition);
1005 * @param set1 set to be checked for containment
1006 * @param set2 set to be checked for containment
1014 * Serialized set API
1018 * Serializes this set into an array of 16-bit integers. Serialization
1019 * (currently) only records the characters in the set; multicharacter
1054 * @param set the set
1058 * @param pErrorCode pointer to the error code. Will be set to
1059 * U_INDEX_OUTOFBOUNDS_ERROR if n+2*m > 0x7FFF. Will be set to
1067 uset_serialize(const USet* set, uint16_t* dest, int32_t destCapacity, UErrorCode* pErrorCode);
1070 * Given a serialized array, fill in the given serialized set object.
1081 * Set the USerializedSet to contain the given character (and nothing
1084 * @param c The codepoint to set
1093 * @param set the serialized set
1094 * @param c The codepoint to check for within the set
1095 * @return true if set contains c
1099 uset_serializedContains(const USerializedSet* set, UChar32 c);
1103 * the given serialized set. Ignores any strings contained in the
1104 * set.
1105 * @param set the serialized set
1107 * contained in set
1111 uset_getSerializedRangeCount(const USerializedSet* set);
1115 * set.
1116 * @param set the serialized set
1118 * uset_getSerializedRangeCount(set)-1
1127 uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex,