Andrew
Andrew

Reputation: 11

Unicode functions for Lua

Sorry if this has already been asked, but Lua's in-built string functions (such as string.len and string.sub) don't work very well with unicode characters, so are there any alternatives which do?

Upvotes: 1

Views: 292

Answers (1)

Paul Kulchenko
Paul Kulchenko

Reputation: 26794

There are various libraries available that do this, for example: https://github.com/alexander-yakushev/awesompd/blob/master/utf8.lua. Also, Lua 5.3+ supports some of utf8-related functions out of the box: https://www.lua.org/manual/5.3/manual.html#6.5

Upvotes: 2

Related Questions