lua-users home
lua-l archive

Re: String manipulation

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


On Friday, October 31, 2014 06:33:07 PM Emeka wrote:
> I also wanted to do some comparison :
> 
> if mystring.sub(i,i) == ' " ' then .... end It is not comparing at all
> ,and this also failed.
> 
> mystring.sub(i,i) == ' ' ' ..
The spaces in the literal are significant. You're comparing a one-byte string 
to a three-byte string. Of course it will be false.
-- 
tom <telliamed@whoopdedo.org>

AltStyle によって変換されたページ (->オリジナル) /