lua-users home
lua-l archive

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

> The behaviour of the string library function 'strsub' seems non-standard
> with respect to passing lengths greater than the actual string length. The
> actual
> behaviour is the return of an empty string, the expected behaviour is
> truncation down to actual string length

I do agree that the current behavior is not the expected, but I am not sure 
what should be the expected one (truncation is one possibility, error is 
another). We will review this for version 3.2. BTW, does anyone know how 
other "strsub" (from other languages/systems) behave in such circumstances? 

-- Roberto