string.cut and UTF-8

Post Reply
Puckster
Posts: 36
Joined: Fri Jul 30, 2021 11:51 pm

string.cut and UTF-8

Post 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?

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: string.cut and UTF-8

Post by Vadi »


Puckster
Posts: 36
Joined: Fri Jul 30, 2021 11:51 pm

Re: string.cut and UTF-8

Post by Puckster »

Yep. Perfect!

Thanks!!!

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: string.cut and UTF-8

Post by Vadi »

Awesome. I added a link to it in the wiki.

Post Reply