Quote:
Originally Posted by ericshliao
another question:
how do I get the size of buf?
I am trying using the length operator #.
|
The # operator or string.len() probably both do what you want. Beware that these do not stop on '\0'...
Code:
> a='xxx\0yyy'
> print(a)
xxx
> print(#a)
7
> print(string.len(a))
7