StendhalScripting/Lua: Difference between revisions

Content deleted Content added
imported>AntumDeluge
Misc: typecasting
imported>AntumDeluge
Data Types: string concatenation
Line 50:
-- table variable
local var4 = {}
</pre>
 
=== Strings ===
 
==== String Concatenation ====
 
String concatenation is simple, much like Java uses a plus operator (<code>+</code>) to join strings, Lua uses two periods (<code>..</code>).
 
Example:
<pre>
-- create a string variable
local var = "Hello"
 
-- append another string
var = var .. " world!"
 
print(var) -- prints "Hello world!"
</pre>