Re: [NoW] Missing things from Lua
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: [NoW] Missing things from Lua
- From: Dirk Laurie <dirk.laurie@...>
- Date: 2019年5月16日 18:09:29 +0200
Op Do. 16 Mei 2019 om 17:58 het Paul K <paul@zerobrane.com> geskryf:
>
> Hi Dirk,
>
> > for p, c in string.bytes(s) do body end
> > will iterate over all bytes in string s, with p being the position.
> > This is surprisingly clumsy in pure Lua, unless I am missing a trick.
>
> `s:gmatch("()(.)")`? Or am I missing something?
>
> Paul.
Perfect. I'll withdraw the "surprisingly clumsy" now.