[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: string:sub
- From: David Burgess <dabsoft@...>
- Date: Sun, 07 Mar 2010 00:14:01 +1100
Maybe you have identified the issue:
Lua 5.1.2 Copyright (C) 1994-2007 Lua.org, PUC-Rio
If you get nothing then I guess thats where the confusion comes
from. I will check into this.
On 7/3/2010 12:06 AM, Erik Lindroos wrote:
On Sat, Mar 6, 2010 at 1:59 PM, David Burgess<email@example.com> wrote:
The inconsistency is what the value 0 does on parameter 2,
seemingly the same as -1. I would have expected -1 on parameter 2
to mean 1 less than zero, i.e. -1 from the end.
What do you mean with seemingly the same? Clearly it's not the same. sub(1,
0) gives you an empty string, sub(1, -1) gives you the whole string, just as