lua-users home
lua-l archive

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




On 24/09/15 12:39 PM, Dirk Laurie wrote:
Consider the following code:

local trim_pattern = "^%s*(.*%S)%s*$"

Wouldn't it be faster if you trimmed at start, reversed, then trimmed at start again? (or maybe at start, then at end?)

--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.