[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: What is a string?
- From: Dirk Laurie <dirk.laurie@...>
- Date: Fri, 22 Jun 2012 11:33:35 +0200
2012/6/22 Peng Zhicheng <email@example.com>:
> right, strings are strings.
> in Lua, strings are not defined as arrays of characters(like C).
We have had this point before.
The post started like this:
> The title of this post is a quote from the Lua Reference Manual,
> Section 2.2 in Lua 5.1, Section 2.1 in Lua 5.2. Stare at it
> String represents arrays of characters.
> In the light of that statement, one can't be blamed for expecting
> that s[i] means the i-th character of a string.
And Roberto replied:
> Thanks for the feedback. We will correct this statement. Strings in
> Lua clearly do not represent arrays of characters; people should
> expect s[i] = "x" to work too.
But that correction has not yet been made.