I am trying to iterate through a UTF-8 string. The problem is that UTF-8 characters are of variable length, so I cannot just iterate over char -by-char, but I need to use some kind of conversion. I am sure there is a function for this in modern C ++, but I do not know what it is.
#include <iostream>
Compiled with clang++ -std=c++11 -stdlib=libc++ test.cpp
From what I read wchar_t and wstring should not be used.
source share