Global String - Overview

The Global String functions allow simple string manipulation operations in a script. These functions are all properties of the Global String object, which means that in the script they must be called as follows:

 String.functionName

This means, type the word String followed by the name of one of the OpusScript functions listed below separated by a full stop, For example:

var name = "Mr Smith"
var title = String.left(name, 2)

Note:
All of the Global String functions can be used directly in a script with other functions such as, variable, loop conditions, and so on. Function names are case-sensitive and must be typed as they appear in the Functions heading below.

Hierarchy:

Only the specific functions listed under the Functions: heading below can be used with Global String objects:

Class Hierarchy:

Global String

Hierarchy of objects in Opus

Functions:

bool

Convert a value to a Boolean

contains

Test if one string contains another string

format

Format a number as a string

integer

Convert a value to an integer

left

Get the left end of a string

length

Get the length of a string

mid

Get part of the middle of a string

number

Convert a value to a number

random

Get a random integer

right

Get the right end of a string

string

Convert a value to a string

tolower

Get a lower case version of a string

toupper

Get an upper case version of a string

word

Get a word from a string