class USetRanges

Defined at line 1608 of file ../../third_party/icu/default/source/common/unicode/uset.h

C++ "range" for iterating over the code point ranges of a USet.

C++ UnicodeSet has member functions for iteration, including ranges().

ICU 76

Code

                                    
                                         using U_HEADER_NESTED_NAMESPACE::USetRanges;
                                         LocalUSetPointer uset(uset_openPattern(u"[abcçカ🚴]", -1, &errorCode));
                                         for (auto [start, end] : USetRanges(uset.getAlias())) {
                                             printf("uset.range U+%04lx..U+%04lx\n", (long)start, (long)end);
                                         }
                                         for (auto range : USetRanges(uset.getAlias())) {
                                             for (UChar32 c : range) {
                                                 printf("uset.range.c U+%04lx\n", (long)c);
                                             }
                                         }
                                    
                                

Public Methods

void USetRanges (const USet * pUset)

Constructs a C++ "range" object over the code point ranges of the USet.

ICU 76

Defined at line 1614 of file ../../third_party/icu/default/source/common/unicode/uset.h

void USetRanges (const USetRanges & other)

ICU 76

Defined at line 1617 of file ../../third_party/icu/default/source/common/unicode/uset.h

USetRangeIterator begin ()

ICU 76

Defined at line 1620 of file ../../third_party/icu/default/source/common/unicode/uset.h

USetRangeIterator end ()

ICU 76

Defined at line 1625 of file ../../third_party/icu/default/source/common/unicode/uset.h