How to truncate utf8 text

How to truncate utf8 text

BY 24 Mar 2016 Native Code Snippet
For example you have got some data from server in utf8 format and store it in some char(byte) array . Every symbol in text could be presented with different amount of bytes, here is example how to cut (restrict) it to desired lenght. Note: allocated clippedStr should be freed after usage…
Written by