logo
Home XtGem- Templates- XtScript- bottom
XtGemmanual

XtScript basics

concatenation

Concatenate strings
(join two strings to create a third string)

Syntax

...[$...]...[$...][...] optional · ... your value

Notes

There is not really any specific function to join strings together it just works this way

Example

<!--parser:xtscript-->
var $a = snow
var $b = ball

#1 To join two or more variables just put them next to each other
var $c = $a$b
print 1/$c <br />

#2 There must be a space or a character that is not valid in a variable name between a variable name and a string 
var $c = $a-man
print 2/$c <br />

#3 The $ character will serve to separate a string from a variable name
var $c=foot$b
print 3/$c <br />

#4 These will not work 
var $c = ($a+$b)
print 4/$c <br />
var $c = $a+$b
print 5/$c <br />

<!--/parser:xtscript-->

Copy as text

Output reload

1/snowball
2/snow-man
3/football
4/0
5/snow+ball

Related

print return var

XtGem manual · all sections

Powered by XtGem
About us Contact Forum top