Investment Studio > Expressions > Functions > Text > LEFT

string left(string in_string, integer length = 1)

Returns a string consisting of the length leftmost characters in in_string. The specified length must be >= 0; if it exceeds the length of in_string, the entire string is returned.

If length is omitted, it defaults to 1.

Examples

=left("This is a string")

equals "T"

=left("This is a string", 4)

equals "This"

=left("This is a string", 100)

equals "This is a string".

See also len, mid, right.