ICU 76.1 76.1
Loading...
Searching...
No Matches
Public Member Functions
U_HEADER_ONLY_NAMESPACE::USetStrings Class Reference

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

#include <uset.h>

Public Member Functions

 USetStrings (const USet *uset)
 Constructs a C++ "range" object over the strings of the USet.
 
 USetStrings (const USetStrings &other)=default
 
USetStringIterator begin () const
 
USetStringIterator end () const
 

Detailed Description

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

using U_HEADER_NESTED_NAMESPACE::USetStrings;
LocalUSetPointer uset(uset_openPattern(u"[abcçカ🚴{}{abc}{de}]", -1, &errorCode));
for (auto s : USetStrings(uset.getAlias())) {
UnicodeString us(s);
std::string u8;
printf("uset.string length %ld \"%s\"\n", (long)s.length(), us.toUTF8String(u8).c_str());
}
"Smart pointer" class, closes a USet via uset_close().
C++ "range" for iterating over the empty and multi-character strings of a USet.
Definition uset.h:1715
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 strings().

Draft:
This API may be changed in the future versions and was introduced in ICU 76
See also
USetCodePoints
USetRanges
USetElements

Definition at line 1715 of file uset.h.

Constructor & Destructor Documentation

◆ USetStrings() [1/2]

U_HEADER_ONLY_NAMESPACE::USetStrings::USetStrings ( const USet uset)
inline

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

Draft:
This API may be changed in the future versions and was introduced in ICU 76

Definition at line 1721 of file uset.h.

◆ USetStrings() [2/2]

U_HEADER_ONLY_NAMESPACE::USetStrings::USetStrings ( const USetStrings other)
default
Draft:
This API may be changed in the future versions and was introduced in ICU 76

Member Function Documentation

◆ begin()

USetStringIterator U_HEADER_ONLY_NAMESPACE::USetStrings::begin ( ) const
inline
Draft:
This API may be changed in the future versions and was introduced in ICU 76

Definition at line 1727 of file uset.h.

◆ end()

USetStringIterator U_HEADER_ONLY_NAMESPACE::USetStrings::end ( ) const
inline
Draft:
This API may be changed in the future versions and was introduced in ICU 76

Definition at line 1732 of file uset.h.


The documentation for this class was generated from the following file: