Re: strings
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: strings
- From: "RJP Computing" <rjpcomputing@...>
- Date: 2008年12月21日 16:06:53 -0500
On Sun, Dec 21, 2008 at 3:53 PM, Sean Farrow
<sean.farrow@seanfarrow.co.uk> wrote:
Hi:
if a string is
empty, i.e "" can I compare it with nil?
Chers
Sean.
Use 'string.len()' to compare the size to 0.
example:
local str = ""
if str:len() == 0 then
print( "The string is empty" )
else
print( "The string has some content" )
end
--
Regards,
Ryan