ICU 78.1  78.1
Public Member Functions
U_HEADER_ONLY_NAMESPACE::UTFStringCodePoints< CP32, behavior, Range > Class Template Reference

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. More...
 
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. More...
 
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. More...
 
 UTFStringCodePoints (const UTFStringCodePoints &other)=default
 Copy constructor. More...
 
UTFStringCodePointsoperator= (const UTFStringCodePoints &other)=default
 Copy assignment operator. More...
 
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
 

Detailed Description

template<typename CP32, UTFIllFormedBehavior behavior, typename Range>
class U_HEADER_ONLY_NAMESPACE::UTFStringCodePoints< CP32, behavior, Range >

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.

Template Parameters
CP32Code point type: UChar32 (=int32_t) or char32_t or uint32_t; should be signed if UTF_BEHAVIOR_NEGATIVE
behaviorHow to handle ill-formed Unicode strings
RangeA C++ "range" of Unicode UTF-8/16/32 code units
Draft:
This API may be changed in the future versions and was introduced in ICU 78
See also
utfStringCodePoints

Definition at line 1752 of file utfiterator.h.

Constructor & Destructor Documentation

◆ UTFStringCodePoints() [1/4]

template<typename CP32 , UTFIllFormedBehavior behavior, typename Range >
U_HEADER_ONLY_NAMESPACE::UTFStringCodePoints< CP32, behavior, Range >::UTFStringCodePoints ( )
default

Constructs an empty C++ "range" object.

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

◆ UTFStringCodePoints() [2/4]

template<typename CP32 , UTFIllFormedBehavior behavior, typename Range >
template<typename R = Range, typename = std::enable_if_t<!std::is_reference_v<R>>>
U_HEADER_ONLY_NAMESPACE::UTFStringCodePoints< CP32, behavior, Range >::UTFStringCodePoints ( Range  unitRange)
inlineexplicit

Constructs a C++ "range" object over the code points in the string.

Parameters
unitRangeinput range
Draft:
This API may be changed in the future versions and was introduced in ICU 78

Definition at line 1767 of file utfiterator.h.

◆ UTFStringCodePoints() [3/4]

template<typename CP32 , UTFIllFormedBehavior behavior, typename Range >
template<typename R = Range, typename = std::enable_if_t<std::is_reference_v<R>>, typename = void>
U_HEADER_ONLY_NAMESPACE::UTFStringCodePoints< CP32, behavior, Range >::UTFStringCodePoints ( Range  unitRange)
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).

Parameters
unitRangeinput range
Draft:
This API may be changed in the future versions and was introduced in ICU 78

Definition at line 1777 of file utfiterator.h.

◆ UTFStringCodePoints() [4/4]

template<typename CP32 , UTFIllFormedBehavior behavior, typename Range >
U_HEADER_ONLY_NAMESPACE::UTFStringCodePoints< CP32, behavior, Range >::UTFStringCodePoints ( const UTFStringCodePoints< CP32, behavior, Range > &  other)
default

Copy constructor.

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

Member Function Documentation

◆ begin() [1/2]

template<typename CP32 , UTFIllFormedBehavior behavior, typename Range >
auto U_HEADER_ONLY_NAMESPACE::UTFStringCodePoints< CP32, behavior, Range >::begin ( )
inline
Returns
the range start iterator
Draft:
This API may be changed in the future versions and was introduced in ICU 78

Definition at line 1789 of file utfiterator.h.

Referenced by U_HEADER_ONLY_NAMESPACE::UTFStringCodePoints< CP32, behavior, Range >::rend().

◆ begin() [2/2]

template<typename CP32 , UTFIllFormedBehavior behavior, typename Range >
template<typename R = Range, typename = std::enable_if_t<prv::range<const R>>>
auto U_HEADER_ONLY_NAMESPACE::UTFStringCodePoints< CP32, behavior, Range >::begin ( ) const
inline
Returns
the range start iterator
Draft:
This API may be changed in the future versions and was introduced in ICU 78

Definition at line 1798 of file utfiterator.h.

◆ end() [1/2]

template<typename CP32 , UTFIllFormedBehavior behavior, typename Range >
auto U_HEADER_ONLY_NAMESPACE::UTFStringCodePoints< CP32, behavior, Range >::end ( )
inline
Returns
the range limit (exclusive end) iterator
Draft:
This API may be changed in the future versions and was introduced in ICU 78

Definition at line 1806 of file utfiterator.h.

Referenced by U_HEADER_ONLY_NAMESPACE::UTFStringCodePoints< CP32, behavior, Range >::rbegin().

◆ end() [2/2]

template<typename CP32 , UTFIllFormedBehavior behavior, typename Range >
template<typename R = Range, typename = std::enable_if_t<prv::range<const R>>>
auto U_HEADER_ONLY_NAMESPACE::UTFStringCodePoints< CP32, behavior, Range >::end ( ) const
inline
Returns
the range limit (exclusive end) iterator
Draft:
This API may be changed in the future versions and was introduced in ICU 78

Definition at line 1825 of file utfiterator.h.

◆ operator=()

template<typename CP32 , UTFIllFormedBehavior behavior, typename Range >
UTFStringCodePoints& U_HEADER_ONLY_NAMESPACE::UTFStringCodePoints< CP32, behavior, Range >::operator= ( const UTFStringCodePoints< CP32, behavior, Range > &  other)
default

Copy assignment operator.

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

◆ rbegin()

template<typename CP32 , UTFIllFormedBehavior behavior, typename Range >
auto U_HEADER_ONLY_NAMESPACE::UTFStringCodePoints< CP32, behavior, Range >::rbegin ( ) const
inline
Returns
std::reverse_iterator(end())
Draft:
This API may be changed in the future versions and was introduced in ICU 78

Definition at line 1843 of file utfiterator.h.

References U_HEADER_ONLY_NAMESPACE::UTFStringCodePoints< CP32, behavior, Range >::end().

◆ rend()

template<typename CP32 , UTFIllFormedBehavior behavior, typename Range >
auto U_HEADER_ONLY_NAMESPACE::UTFStringCodePoints< CP32, behavior, Range >::rend ( ) const
inline
Returns
std::reverse_iterator(begin())
Draft:
This API may be changed in the future versions and was introduced in ICU 78

Definition at line 1851 of file utfiterator.h.

References U_HEADER_ONLY_NAMESPACE::UTFStringCodePoints< CP32, behavior, Range >::begin().


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