Table of Contents

Strings

Literal strings

Arguments in ZeoScript are delimited by spaces. Hence, any string argument that contains a space will be split into separate strings. To prevent string splitting, you should surround your string in “quotation marks”. Here is an example:

project.SaveProjectAs "C:\\temp\\this is a temp project name.proj"

String concatenation

Two strings may be concatenated together using the strcat function. More strings may be added by nesting calls to strcat, as below:

// create a new string for name
string MyName

// allow user to edit name
EditUI &MyName "Please enter your name"

// add strings together ("Hello " + MyName + "!"), and echo to screen
echo <strcat "Hello " <strcat MyName "!">>

The output of this script is:

Hello Aaron!

String lengths

The length of a string may be determined using the strlen function, as demonstrated below:

string s
int i

// initialise a string
set s "This text is 31 characters long"

// get the text length using 'strlen'
set i <strlen s>

// report the text length
echo i

The output of this script is:

31