[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: operator overloading for string matching
- From: Rena <hyperhacker@...>
- Date: Mon, 17 Aug 2015 23:49:33 -0400
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.