Yeah. I just meant that most languages have built-in functions that do what mine does. >.<
Know whatcha mean. First time through, it definitely looks like a deficiency.
Things get complicated as soon as metatables come into play, and tables with extra behavior start popping up. On the other hand, you can use the "len" metamethod and customize the behavior of the # operator for your own tables.
More practically: If you have a string that has to have a single quote in it, delimit with double quotes. And vice versa. If you need a string that has both: concatenation is the name of the game.
"My cousin's father"..' said:"Come over here". And I went.'
[[My cousin's father said:"Come over here". And I went.]]
[[blah]] is the string delimiter as well as "blah" and 'blah'. If that isn't enough, you can also use [=[blah]=], or [==[blah]==], or [===[blah]===] inserting as many equal signs as you need, they are all valid Lua strings for the string "blah".
Know whatcha mean. First time through, it definitely looks like a deficiency.
Things get complicated as soon as metatables come into play, and tables with extra behavior start popping up. On the other hand, you can use the "len" metamethod and customize the behavior of the # operator for your own tables.
That's what I end up doing, rather than mess around with other eccentricities. Ah, Lua.
As far as interpolation goes, this is correct:
more info:
[[blah]] is the string delimiter as well as "blah" and 'blah'. If that isn't enough, you can also use [=[blah]=], or [==[blah]==], or [===[blah]===] inserting as many equal signs as you need, they are all valid Lua strings for the string "blah".