[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: How to make table object has the shortcut ability as string
- From: Tang Daogang <daogangtang@...>
- Date: Thu, 13 Jan 2011 10:31:17 +0800
Dear all,
I have a table
a = { '1', '2', '3' },
now, I can use
table.remove(a, 2)
to remove the second element. But I want to write
a:remove(2)
to achieve the same result, just like string's ability. Is there some way to implement it?
Maybe there are already discussions on it in this list before, but I don't know what key word to use to search, so ask here for help.
Thx.