lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, Aug 17, 2015 at 2:57 PM, Mason Bogue <scythe+lua@ortsz.com> wrote:
> trailing_whitespace = #(s / ".*(%s*)$")
This is a trivial example and already looks near incomprehensible to me.

> start, end = s:find("%s*$")
> trailing_whitespace = end - start
This on the other hand takes one more line and is much clearer, just
for having fewer symbols grouped together.

-- 
Sent from my Game Boy.