String functions

Guid

Declaration

string Guid()

Description

Creates GUID.

Supported Runtime Versions

5.0

Parameters

The function has no parameters.

Return Value

New string with GUID in the given format type: 465ce0d3-dd54-4fc8-bf9a-b65e43c256d4.

StringConcat

Declaration

string StringConcat(string s1, string s2)

Description

Concatenates two strings.

Supported Runtime Versions

1.0, 2.0, 3.0, 4.0, 5.0

Parameters Description
s1 First string to be concatenated.
s2 Second string to be concatenated.

Return Value

Concatenation of s1 and s2.

StringContains

Declaration

bool StringContains(string s, string find)

Description

Checks whether a given string contains another string.

Supported Runtime Versions

1.0, 2.0, 3.0, 4.0, 5.0

Parameters Description
s String to be checked.
find String to look for.

Return Value

True, if 'find' could be found in s, false otherwise.

StringEndsWith

Declaration

bool StringEndsWith(string s, string find)

Description

Checks whether a given string ends with a certain string.

Supported Runtime Versions

1.0, 2.0, 3.0, 4.0, 5.0

Parameters Description
s String to be checked.
find End string to be checked for.

Return Value

True, if s ends with 'find', false otherwise.

StringFind

Declaration

int StringFind(string s, string find, int start)

Description

Tries to find a substring in a string.

Supported Runtime Versions

1.0, 2.0, 3.0, 4.0, 5.0

Parameters Description
s The string to search in.
find The string to be searched for.
start The index in string s to start the search at.

Return Value

The index of the 'find' string in s.

StringJoin

Declaration

string StringJoin(StringArray array, string delimiter)

Description

Combines all elements of StringArray into a single string.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
array Array of strings to be combined.
delimiter Delimiter used to separate the strings.

Return Value

A single string containing all array elements separated by the delimiter.

StringJoin

Declaration

string StringJoin(StringList list, string delimiter)

Description

Combines all elements of a StringList into a single string.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
list List of strings to be combined.
delimiter Delimiter used to separate the strings.

Return Value

A single string containing all list elements separated by the delimiter.

StringLeft

Declaration

string StringLeft(string s, int length)

Description

Returns a string containing a specified number of characters from the left side of a string.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
s String to return characters for.
length Number of characters to be returned.

Return Value

A string containing a specified number of characters from the left side of a string.

StringLength

Declaration

int StringLength(string s)

Description

Calculates the length of a given string measured in characters.

Supported Runtime Versions

1.0, 2.0, 3.0, 4.0, 5.0

Parameters Description
s String to calculate length of.

Return Value

Length of string s measured in characters.

StringMatchesRegex

Declaration

bool StringMatchesRegex(string s, string regex)

Description

Checks whether a string matches a certain regular expression.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
s The string to be checked.
regex The regular expression to look for.

Return Value

True, if the string matches the regular expression, false otherwise.

StringReplace

Declaration

string StringReplace(string s, string find, string replace, bool onlyFirst)

Description

Replaces a substring in a given string by a new value.

Supported Runtime Versions

1.0, 2.0, 3.0, 4.0, 5.0

Parameters Description
s The string to be modified.
find The substring to be replaced.
replace The replacement for the substring.
onlyFirst If true, only the first occurrence will be replaced. Otherwise, all occurrences will be replaced.

Return Value

The string including the replaced part.

StringReplaceRegex

Declaration

string StringReplaceRegex(string s, string regex, string replace, bool onlyFirst)

Description

Replaces one or all occurrences of a regular expression in a string with a replacement string.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
s The string to be modified.
regex The regular expression to look for.
replace The replacement string.
onlyFirst If true, only the first match of the regular expression will be replaced.

Return Value

The modified string.

StringRight

Declaration

string StringRight(string s, int length)

Description

Returns a string containing a specified number of characters from the right side of a string.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
s String to return characters for.
length Number of characters to be returned.

Return Value

A string containing a specified number of characters from the right side of a string.

StringSplit

Declaration

StringArray StringSplit(string s, string delimiter)

Description

Splits a string at a delimiter character and returns its parts as a StringArray.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
s The string to be split.
delimiter The delimiter to split at.

Return Value

A StringArray containing the separate parts of the string.

StringSplit

Declaration

StringArray StringSplit(string s, string delimiter, int count)

Description

Splits a string at a delimiter character and returns its parts as a StringArray.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
s The string to be split.
delimiter The delimiter to split at.
count The maximum number of elements to be returned.

Return Value

A StringArray containing the separate parts of the string.

StringSplitRegex

Declaration

StringArray StringSplitRegex(string s, string regex)

Description

Splits a string at a regular expression and returns its parts as a StringArray.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
s The string to be split.
regex A regular expression to split at.

Return Value

A StringArray containing the separate parts of the string.

StringStartsWith

Declaration

bool StringStartsWith(string s, string find)

Description

Checks whether a given string starts with a certain string.

Supported Runtime Versions

1.0, 2.0, 3.0, 4.0, 5.0

Parameters Description
s String to be checked.
find Start string to be checked for.

Return Value

True, if s starts with 'find', false otherwise.

StringSubstring

Declaration

string StringSubstring(string s, int startIndex, int length)

Description

Returns a substring contained in a string.

Supported Runtime Versions

1.0, 2.0, 3.0, 4.0, 5.0

Parameters Description
s String from which a substring is to be received.
startIndex Start index (starting at 0) of the substring.
length Length of the substring.

Return Value

Substring having length 'length' and starting at index 'startIndex'.

StringTrim

Declaration

string StringTrim(string s)

Description

Trims all leading and trailing white spaces from a string.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
s String to be trimmed.

Return Value

The trimmed string.

StringTrimEnd

Declaration

string StringTrimEnd(string s)

Description

Trims all leading white spaces from a string.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
s String to be trimmed.

Return Value

The trimmed string.

StringTrimStart

Declaration

string StringTrimStart(string s)

Description

Trims all trailing white spaces from a string.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
s String to be trimmed.

Return Value

The trimmed string.

ToBool

Declaration

bool ToBool(string value)

Description

Converts a string into a bool value.

Supported Runtime Versions

5.0

Parameters Description
value The string to be converted into a bool.

Return Value

Bool representation of value.

ToDouble

Declaration

double ToDouble(string value, string culture)

Description

Converts a string into a double value using specific culture. The function raises an error if value is not numeric.

Supported Runtime Versions

5.0

Parameters Description
value The string to be converted into a double.
culture The culture to be used.

Return Value

Double representation of a value.

ToDouble

Declaration

double ToDouble(string value)

Description

Converts a string into a double value. The function raises an error if value is not numeric.

Supported Runtime Versions

1.0, 2.0, 3.0, 4.0, 5.0

Parameters Description
value The string to be converted into a double.

Return Value

Double representation of a value.

ToInt

Declaration

int ToInt(double x)

Description

Converts a double value to an int type.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
x The double value to be converted.

Return Value

Value x converted to an int type.

ToInt

Declaration

int ToInt(string value)

Description

Converts a string into an int. The function raises an error if value is not numeric.

Supported Runtime Versions

1.0, 2.0, 3.0, 4.0, 5.0

Parameters Description
value The string to be converted into an int.

Return Value

Int representation of value.

ToLower

Declaration

string ToLower(string s)

Description

Turns all characters in a string into lowercase.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
s The string to be converted.

Return Value

New string containing only lowercase characters.

ToString

Declaration

string ToString(double value, string culture)

Description

Converts a double value into a string, using specific culture.

Supported Runtime Versions

5.0

Parameters Description
value The double value to be converted into a string.
culture The culture to be used.

Return Value

The string representation of a value.

ToString

Declaration

string ToString(DateTime value)

Description

Converts an DateTime into a culture-invariant string representing the date time.

Supported Runtime Versions

5.0

Parameters Description
value Timestamp whose value should be converted into a string.

Return Value

The value of the timestamp as a string.

ToString

Declaration

string ToString(DateTime value, string culture)

Description

Converts an DateTime into a string formatted according to the culture parameter.

Supported Runtime Versions

5.0

Parameters Description
value Timestamp whose value should be converted into a string.
culture Culture to be used for formatting the date-time string.

Return Value

The value of the timestamp as a string.

ToString

Declaration

string ToString(Variant value)

Description

Converts Variant into a string.

Supported Runtime Versions

5.0

Parameters Description
value Variant whose value should be converted into a string.

Return Value

The value of the variant as a string.

ToString

Declaration

string ToString(XMLDocument document)

Description

Returns a string representation of an XMLDocument.

Supported Runtime Versions

5.0

Parameters Description
document The XMLDocument to be converted into a string.

Return Value

A string representation of an XMLDocument.

ToString

Declaration

string ToString(XMLElement element)

Description

Returns a string representation of an XMLElement.

Supported Runtime Versions

5.0

Parameters Description
element The XMLElement to be converted into a string.

Return Value

A string representation of an XMLElement.

ToString

Declaration

string ToString(bool value)

Description

Converts a bool value into a string.

Supported Runtime Versions

1.0, 2.0, 3.0, 4.0, 5.0

Parameters Description
value The bool value to be converted into a string.

Return Value

The string representation of a value.

ToString

Declaration

string ToString(int value)

Description

Converts an int value into a string.

Supported Runtime Versions

1.0, 2.0, 3.0, 4.0, 5.0

Parameters Description
value The int value to be converted into a string.

Return Value

The string representation of a value.

ToString

Declaration

string ToString(double value)

Description

Converts a double value into a string.

Supported Runtime Versions

1.0, 2.0, 3.0, 4.0, 5.0

Parameters Description
value The double value to be converted into a string.

Return Value

The string representation of a value.

ToString

Declaration

string ToString(double value, string format, string culture)

Description

Converts a double value into a string using specific format and culture.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
value The double value to be converted into a string.
format The format to be used.
culture The culture to be used.

Return Value

The string representation of a value.

ToString

Declaration

string ToString(OLAPElement value)

Description

Converts an OlapElement into a string representing the element name.

Supported Runtime Versions

1.0, 2.0, 3.0, 4.0, 5.0

Parameters Description
value OlapElement value to be converted into a string.

Return Value

The name of the OlapElement.

ToString

Declaration

string ToString(OLAPDimension value)

Description

Converts an OlapDimension into a string representing the dimension name.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
value OlapDimension value to be converted into a string.

Return Value

The name of the OlapDimension.

ToString

Declaration

string ToString(OLAPAttribute value)

Description

Converts an OlapAttribute into a string representing the attribute name.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
value OlapAttribute value to be converted into a string.

Return Value

The name of the OlapAttribute.

ToString

Declaration

string ToString(OLAPCell value)

Description

Converts an OlapCell into a string representing the cell's value.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
value OlapCell whose value should be converted into a string.

Return Value

The value of the OlapCell as a string.

ToUpper

Declaration

string ToUpper(string s)

Description

Turns all characters in a string into uppercase.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
s The string to be converted.

Return Value

New string containing only uppercase characters.