> Building your report / Expressions / Functions / String functions

String functions

A string is a sequence of characters used to represent text.

Below is a list of String functions, which can be used in expressions.

Function Description
Compare(s1, s2) Compares two specified strings.
Concat(s1, s2) Concatenates two specified instances of string.
Contains(s1, s2) Returns a value indicating whether the specified string occurs within a string.
CString(value) Returns a string that represents the given item on the report.
EndsWith(s1, s2) Determines whether the end of an instance of string matches a specified string.
FormatString(format, args) Replaces each format item in a specified string with the text equivalent of a corresponding object's value.
IndexOf(s1, s2) Reports the index of the first occurrence of the specified string in this instance.
Insert(s1, s2, index) Inserts a specified instance of string at a specified index position in this instance.
LastIndexOf(s1, s2) Reports the index of the last occurrence of the specified string in this instance.
Length(s1) Gets the number of characters in this instance.
PadLeft(s1, c, count) Right-aligns the characters in this instance, padding on the left with a specified character for a specified total length.
PadRight(s1, c, count) Left-aligns the characters in this instance, padding on the right with a specified character for a specified total length.
Remove(s1, start, length) Deletes a specified number of characters from this string.
Replace(s1, replace, with) Replaces all occurrences of a specified string in this instance with another specified string.
StartsWith(s1, s2) Determines whether the beginning of an instance of string matches a specified string.
Substring(s1, start, length) Retrieves a substring from a string.
ToLower(s1) Converts a string to lower case.
ToUpper(s1) Converts a string to upper case.
Trim(s1) Removes all occurrences of white space characters from the beginning and end of a string.
TrimEnd(s1) Removes all occurrences of white space characters from the end of a string.
TrimStart(s1) Removes all occurrences of white space characters from the beginning of a string.

Go to top