class USetStrings

Defined at line 1718 of file ../../third_party/icu/latest/source/common/unicode/uset.h

C++ "range" for iterating over the empty and multi-character strings of a USet.

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

ICU 76

Code

                                    
                                         using U_HEADER_NESTED_NAMESPACE::USetStrings;
                                         LocalUSetPointer uset(uset_openPattern(u"[abcçカ🚴{}{abc}{de}]", -1, &errorCode));
                                         for (auto s : USetStrings(uset.getAlias())) {
                                             int32_t len32 = s.length();
                                             char utf8[200];
                                             u_strToUTF8WithSub(utf8, int32_t{sizeof(utf8) - 1}, nullptr,
                                                                s.data(), len32, 0xFFFD, nullptr, errorCode);
                                             printf("uset.string length %ld \"%s\"\n", long{len32}, utf8);
                                         }
                                    
                                

Public Methods

void USetStrings (const USet * pUset)

Constructs a C++ "range" object over the strings of the USet.

ICU 76

Defined at line 1724 of file ../../third_party/icu/latest/source/common/unicode/uset.h

void USetStrings (const USetStrings & other)

ICU 76

Defined at line 1727 of file ../../third_party/icu/latest/source/common/unicode/uset.h

USetStringIterator begin ()

ICU 76

Defined at line 1730 of file ../../third_party/icu/latest/source/common/unicode/uset.h

USetStringIterator end ()

ICU 76

Defined at line 1735 of file ../../third_party/icu/latest/source/common/unicode/uset.h