lua-users home
lua-l archive

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


there is some how, in Lua, to access string bytes like an array; something like what we can use in C or Pascal?


s = 'Lua race'
print( a[5] ) --> prints "r"

It would be very desirable to be able to write too, like:

s[5] = 'f'
print( s ) --> prints "Lua face"


Marco Antonio Abreu