Altova MobileTogether Designer

SPL provides the string manipulation mechanisms that are listed below. These methods are applied on the input string itself.

 

integer Compare(s)

The return value indicates the lexicographic relation of the string to s (case-sensitive):

<0

the string is less than s

0

the string is identical to s

>0

the string is greater than s

 

 

integer CompareNoCase(s)

The return value indicates the lexicographic relation of the string to s (case-insensitive):

<0

the string is less than s

0

the string is identical to s

>0

the string is greater than s

 

 

integer Find(s)

Searches the string for the first match of a substring s. Returns the zero-based index of the first character of s or -1 if s is not found.

 

 

string Left(n)

Returns the first n characters of the string.

 

 

integer Length()

Returns the length of the string.

 

 

string MakeUpper()

Returns a string converted to upper case.

 

 

string MakeUpper(n)

Returns a string, optionally with the first n characters converted to upper case.

 

 

string MakeLower()

Returns a string converted to lower case.

 

 

string MakeLower(n)

Returns a string, optionally with the first n characters converted to lower case.

 

 

string Mid(n)

Returns a string starting with the zero-based index position n.

 

 

string Mid(n,m)

Returns a string starting with the zero-based index position n and the length m.

 

 

string RemoveLeft(s)

Returns a string excluding the substring s if Left(s.Length()) is equal to substring s.

 

 

string RemoveLeftNoCase(s)

Returns a string excluding the substring s if Left(s.Length()) is equal to substring s (case-insensitive).

 

 

string RemoveRight(s)

Returns a string excluding the substring s if Right(s.Length()) is equal to substring s.

 

 

string RemoveRightNoCase(s)

Returns a string excluding the substring s if Right(s.Length()) is equal to substring s (case insensitive).

 

 

string Repeat(s,n)

Returns a string containing substring s repeated n times.

 

 

string Replace(sOld,sNew)

Replaces the string sOld with the string sNew.

 

 

string Right(n)

Returns the last n characters of the string.

 

 

string TrimLeft()

Returns the string after trimming spaces from the left. Trimming stops when a non-space character is encountered.

 

 

string TrimLeft(s)

Returns the string after removing, from the left, all the characters contained in s. Trimming stops when a character is encountered that is not contained in s.

 

 

string TrimLeftRight()

Returns the string after trimming spaces from the left and the right. Trimming stops when a non-space character is encountered.

 

 

string TrimLeftRight(s)

Returns the string after removing, from the left and the right, all the characters contained in s. Trimming stops at left and at right when a character is encountered that is not contained in s.

 

 

string TrimRight()

Returns the string after trimming spaces from the right. Trimming stops when a non-space character is encountered.

 

 

string TrimRight(s)

Returns the string after removing, from the right, all the characters contained in s. Trimming stops when a character is encountered that is not contained in s.

 

String properties

The following properties are available:

 

Length: returns the length of the string. Example: $Options.deploymentPath.Length returns the length of the string contained in deploymentPath.

XMLEncode: returns the length of the string in XML-encoded format. Example: $Options.deploymentPath.XMLEncode returns the string contained in deploymentPath as XML-escaped text.

 

© 2018-2024 Altova GmbH