ICU 78.1  78.1
Public Member Functions
U_HEADER_ONLY_NAMESPACE::USetCodePoints Class Reference

C++ "range" for iterating over the code points of a USet. More...

#include <uset.h>

Public Member Functions

 USetCodePoints (const USet *pUset)
 Constructs a C++ "range" object over the code points of the USet. More...
 
 USetCodePoints (const USetCodePoints &other)=default
 
USetCodePointIterator begin () const
 
USetCodePointIterator end () const
 

Detailed Description

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

using U_HEADER_NESTED_NAMESPACE::USetCodePoints;
LocalUSetPointer uset(uset_openPattern(u"[abcçカ🚴]", -1, &errorCode));
for (UChar32 c : USetCodePoints(uset.getAlias())) {
printf("uset.codePoint U+%04lx\n", (long)c);
}
"Smart pointer" class, closes a USet via uset_close().
USetCodePoints(const USet *pUset)
Constructs a C++ "range" object over the code points of the USet.
Definition: uset.h:1428
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
Definition: umachine.h:449
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 codePoints().

Stable:
ICU 76
See also
USetRanges
USetStrings
USetElements

Definition at line 1422 of file uset.h.

Constructor & Destructor Documentation

◆ USetCodePoints() [1/2]

U_HEADER_ONLY_NAMESPACE::USetCodePoints::USetCodePoints ( const USet pUset)
inline

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

Stable:
ICU 76

Definition at line 1428 of file uset.h.

◆ USetCodePoints() [2/2]

U_HEADER_ONLY_NAMESPACE::USetCodePoints::USetCodePoints ( const USetCodePoints other)
default
Stable:
ICU 76

Member Function Documentation

◆ begin()

USetCodePointIterator U_HEADER_ONLY_NAMESPACE::USetCodePoints::begin ( ) const
inline
Stable:
ICU 76

Definition at line 1434 of file uset.h.

◆ end()

USetCodePointIterator U_HEADER_ONLY_NAMESPACE::USetCodePoints::end ( ) const
inline
Stable:
ICU 76

Definition at line 1439 of file uset.h.


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