|
ICU 78.2 78.2
|
A C++ "range" for validating iteration over all of the code points of a code unit range. More...
#include <utfiterator.h>
Public Member Functions | |
| UTFStringCodePoints ()=default | |
| Constructs an empty C++ "range" object. | |
| template<typename R = Range, typename = std::enable_if_t<!std::is_reference_v<R>>> | |
| UTFStringCodePoints (Range unitRange) | |
| Constructs a C++ "range" object over the code points in the string. | |
| template<typename R = Range, typename = std::enable_if_t<std::is_reference_v<R>>, typename = void> | |
| UTFStringCodePoints (Range unitRange) | |
| Constructs a C++ "range" object over the code points in the string, keeping a reference to the code unit range. | |
| UTFStringCodePoints (const UTFStringCodePoints &other)=default | |
| Copy constructor. | |
| UTFStringCodePoints & | operator= (const UTFStringCodePoints &other)=default |
| Copy assignment operator. | |
| auto | begin () |
| template<typename R = Range, typename = std::enable_if_t<prv::range<const R>>> | |
| auto | begin () const |
| auto | end () |
| template<typename R = Range, typename = std::enable_if_t<prv::range<const R>>> | |
| auto | end () const |
| auto | rbegin () const |
| auto | rend () const |
A C++ "range" for validating iteration over all of the code points of a code unit range.
Call utfStringCodePoints() to have the compiler deduce the Range type.
UTFStringCodePoints is conditionally borrowed; that is, if Range is a borrowed range so is UTFStringCodePoints<CP32, behavior, Range>. Note that when given a range r that is an lvalue and is not a view, utfStringCodePoints(r) uses a ref_view of r as the Range type, which is a borrowed range. In practice, this means that given a container variable r, the iterators of utfStringCodePoints(r) can be used as long as iterators on r are valid, without having to keep utfStringCodePoints(r) around. For instance:
| CP32 | Code point type: UChar32 (=int32_t) or char32_t or uint32_t; should be signed if UTF_BEHAVIOR_NEGATIVE |
| behavior | How to handle ill-formed Unicode strings |
| Range | A C++ "range" of Unicode UTF-8/16/32 code units |
Definition at line 1777 of file utfiterator.h.
|
default |
Constructs an empty C++ "range" object.
Referenced by operator=(), and UTFStringCodePoints().
|
inlineexplicit |
Constructs a C++ "range" object over the code points in the string.
| unitRange | input range |
Definition at line 1792 of file utfiterator.h.
|
inlineexplicit |
Constructs a C++ "range" object over the code points in the string, keeping a reference to the code unit range.
This overload is used by utfStringCodePoints in C++17; in C+20, a ref_view is used instead (via views::all).
| unitRange | input range |
Definition at line 1802 of file utfiterator.h.
|
default |
Copy constructor.
References UTFStringCodePoints().
|
inline |
Definition at line 1814 of file utfiterator.h.
Referenced by rend().
|
inline |
Definition at line 1823 of file utfiterator.h.
|
inline |
Definition at line 1831 of file utfiterator.h.
Referenced by rbegin().
|
inline |
Definition at line 1850 of file utfiterator.h.
|
default |
Copy assignment operator.
References UTFStringCodePoints().
|
inline |
Definition at line 1868 of file utfiterator.h.
References end().
|
inline |
Definition at line 1876 of file utfiterator.h.
References begin().