[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: String manipulation
- From: Ico Doornekamp <lua@...>
- Date: Sat, 01 Nov 2014 10:08:52 +0100
* On 2014-11-01 09:15:56 +0100, Aapo Talvensaari wrote:
> On Fri, Oct 31, 2014, 19:40 Ico Doornekamp <lua@zevv.nl> wrote:
>
> mystring:gsub('.', dosomething)
>
> Now that in Lua 5.3 we have a basic support for UTF-8. How would one solve
> the question if the input string is a UTF-8 string? (lets see what we
> got...)
Shamelessly stolen from http://lua-users.org/wiki/LuaUnicode:
string.gsub(unicode_string, "[^\128-\193]", dosomehing)
--
:wq
^X^Cy^K^X^C^C^C^C