[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: string.byte()
- From: Tomas <tomas@...>
- Date: Mon, 10 Feb 2003 13:38:58 -0200 (BRST)
> string.byte('') --> bad argument #2 to `byte' (out of range)
^^
> I don't feel that an empty string is an bad argument. I think to return
> nil in this case is more usefull because:
It isn't. The bad argument is nil where you should
use a number to indicate the position at the string. See the
manual:
string.byte (s [, i])
Returns the internal numerical code of the i-th character of s. If i is absent, then it is assumed to be 1. i may be negative.
Tomas