C++ Logo

sg16

Advanced search

Re: [SG16-Unicode] code_unit_sequence and code_point_sequence

From: Lyberta <lyberta_at_[hidden]>
Date: Fri, 03 Aug 2018 05:18:00 +0000
OK. I withdraw code_unit_sequence proposal but I think
code_point_sequence is still very relevant. Consider this:

std::code_point_sequence cps{u8"Test"};
for (const auto cp : cps)
{
    std::cout << std::code_point_name(cp) << '\n';
}

Output:

LATIN CAPITAL LETTER T
LATIN SMALL LETTER E
LATIN SMALL LETTER S
LATIN SMALL LETTER T

This fragment will be used pretty much everywhere when teaching C++ and
Unicode.


Received on 2018-08-03 07:26:27