ICU 78.1  78.1
Public Member Functions
U_HEADER_ONLY_NAMESPACE::CodeUnits< CP32, UnitIter, typename > Class Template Reference

Result of validating and decoding a code unit sequence for one code point. More...

#include <utfiterator.h>

Inheritance diagram for U_HEADER_ONLY_NAMESPACE::CodeUnits< CP32, UnitIter, typename >:
U_HEADER_ONLY_NAMESPACE::UnsafeCodeUnits< CP32, UnitIter, typename >

Public Member Functions

 CodeUnits (CP32 codePoint, uint8_t length, bool wellFormed, UnitIter start, UnitIter limit)
 
 CodeUnits (const CodeUnits &other)=default
 Copy constructor. More...
 
CodeUnitsoperator= (const CodeUnits &other)=default
 Copy assignment operator. More...
 
bool wellFormed () const
 
- Public Member Functions inherited from U_HEADER_ONLY_NAMESPACE::UnsafeCodeUnits< CP32, UnitIter, typename >
 UnsafeCodeUnits (CP32 codePoint, uint8_t length, UnitIter start, UnitIter limit)
 
 UnsafeCodeUnits (const UnsafeCodeUnits &other)=default
 Copy constructor. More...
 
UnsafeCodeUnitsoperator= (const UnsafeCodeUnits &other)=default
 Copy assignment operator. More...
 
CP32 codePoint () const
 
UnitIter begin () const
 
UnitIter end () const
 
uint8_t length () const
 
template<typename Iter = UnitIter, typename Unit = typename std::iterator_traits<Iter>::value_type>
std::enable_if_t< std::is_pointer_v< Iter >||std::is_same_v< Iter, typename std::basic_string< Unit >::iterator >||std::is_same_v< Iter, typename std::basic_string< Unit >::const_iterator >||std::is_same_v< Iter, typename std::basic_string_view< Unit >::iterator >||std::is_same_v< Iter, typename std::basic_string_view< Unit >::const_iterator >, std::basic_string_view< Unit > > stringView () const
 

Detailed Description

template<typename CP32, typename UnitIter, typename = void>
class U_HEADER_ONLY_NAMESPACE::CodeUnits< CP32, UnitIter, typename >

Result of validating and decoding a code unit sequence for one code point.

Returned from validating Unicode string code point iterators. Adds function wellFormed() to base class UnsafeCodeUnits.

Template Parameters
CP32Code point type: UChar32 (=int32_t) or char32_t or uint32_t; should be signed if UTF_BEHAVIOR_NEGATIVE
UnitIterAn iterator (often a pointer) that returns a code unit type: UTF-8: char or char8_t or uint8_t; UTF-16: char16_t or uint16_t or (on Windows) wchar_t; UTF-32: char32_t or UChar32=int32_t or (on Linux) wchar_t
See also
UTFIterator
UTFStringCodePoints
Draft:
This API may be changed in the future versions and was introduced in ICU 78

Definition at line 477 of file utfiterator.h.

Constructor & Destructor Documentation

◆ CodeUnits() [1/2]

template<typename CP32 , typename UnitIter , typename = void>
U_HEADER_ONLY_NAMESPACE::CodeUnits< CP32, UnitIter, typename >::CodeUnits ( CP32  codePoint,
uint8_t  length,
bool  wellFormed,
UnitIter  start,
UnitIter  limit 
)
inline
Internal:
Do not use.

This API is for internal use only.

Definition at line 480 of file utfiterator.h.

◆ CodeUnits() [2/2]

template<typename CP32 , typename UnitIter , typename = void>
U_HEADER_ONLY_NAMESPACE::CodeUnits< CP32, UnitIter, typename >::CodeUnits ( const CodeUnits< CP32, UnitIter, typename > &  other)
default

Copy constructor.

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

Member Function Documentation

◆ operator=()

template<typename CP32 , typename UnitIter , typename = void>
CodeUnits& U_HEADER_ONLY_NAMESPACE::CodeUnits< CP32, UnitIter, typename >::operator= ( const CodeUnits< CP32, UnitIter, typename > &  other)
default

Copy assignment operator.

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

◆ wellFormed()

template<typename CP32 , typename UnitIter , typename = void>
bool U_HEADER_ONLY_NAMESPACE::CodeUnits< CP32, UnitIter, typename >::wellFormed ( ) const
inline
Returns
true if the decoded code unit sequence is well-formed.
Draft:
This API may be changed in the future versions and was introduced in ICU 78

Definition at line 492 of file utfiterator.h.


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