I have an input string that holds characters in different sizes, for example const char * input = "aadđ€€¢¢"
.
The strlen
gave result 15, which mean while 'aad' only took 3 bytes, the other special characters took 2 bytes or more each.
How can I cut characters that fit into 6 bytes from the start of that string? Which mean in this case only 'aadđ' will be taken because aadđ€ would occupy 8 bytes.
I tried normal split character methods but none worked so far. Edit: Because a wide character might get split in the middle and therefore I will get some garbage or a different character instead.