Page 1 of 1

string.cut and UTF-8

Posted: Sun Aug 28, 2022 7:23 pm
by Puckster
I am using string.cut and it is struggling when the string contains special characters. Many of the string functions have UTF8 versions (like string.len and utf8.len), but I don't see anything similar of .cut. Any advice on the best way to handle UTF8 chars with string.cut?

Re: string.cut and UTF-8

Posted: Mon Aug 29, 2022 6:22 am
by Vadi

Re: string.cut and UTF-8

Posted: Tue Aug 30, 2022 7:01 pm
by Puckster
Yep. Perfect!

Thanks!!!

Re: string.cut and UTF-8

Posted: Tue Aug 30, 2022 7:13 pm
by Vadi
Awesome. I added a link to it in the wiki.