A simple UTF-8 encoded text type, mostly for learning purposes
mkdir build
cd build
# Without tests
cmake .. -DBUILD_TESTING=OFF
cmake --build . --config Release
# With tests
cmake ..
cmake --build . --config Release
ctest
cmake --install . --config Release
# Your projects CMakeLists.txt
find_package(auc REQUIRED)
# ... configure <your_target> ...
target_link_libraries(<your_target>
auc
)
#include <auc/u8text.hpp>
int main() {
auc::u8text text(u8"Ī咩鉼歺и(尤ۼñ>w");
if (text.is_valid()) {
for (const auc::codepoint& cp : text.get_codepoints()) {
// ... codepoint-wise operations ...
}
for (const auc::graphemecluster& gc : text.get_grapheme_clusters()) {
// ... grapheme cluster-wise operations ...
}
}
}