lua-users home
lua-l archive

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


Title: Message
You can use the string library
 
From the PIL book, p161
 
  str = "Lua";
  print ( string.sub ( str , 2 , 1 ) ); --> "u"
 
 
Mike
-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br [mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Walter Cruz
Sent: Tuesday, October 11, 2005 2:30 PM
To: Lua list
Subject: newbie question - strings and arrays

Hi.

If i have a string like "Lua" :) in lua, how can I acess the "u"?

I've found that I can't use str[1] like an array.

how can I do this?

[]'s
- Walter