A C++ "range" for iterating over all of the elements of a USet.
Convenient all-in one iteration, but creates a UnicodeString for each code point or string.
Code points are returned first, then empty and multi-character strings.
using U_HEADER_NESTED_NAMESPACE::USetElements;
std::string u8;
printf("uset.string length %ld \"%s\"\n", (long)el.length(), el.toUTF8String(u8).c_str());
}
"Smart pointer" class, closes a USet via uset_close().
U_CAPI USet * uset_openPattern(const UChar *pattern, int32_t patternLength, UErrorCode *ec)
Creates a set from the given pattern.
C++ UnicodeSet has member functions for iteration, including begin() and end().
- Returns
- an all-elements iterator.
- Draft:
- This API may be changed in the future versions and was introduced in ICU 76
- See also
- USetCodePoints
-
USetRanges
-
USetStrings
Definition at line 1865 of file uset.h.