Equinox Online Help - Language Reference - A to Z

Home

Left [Function]

Applies to
SyntaxLeft(StringExpression, SectionExpression)
Action[Function] Returns the left most portion of a string.
ScopeUsable anywhere.
Notes

This function returns the left most portion of StringExpression. SectionExpression defines the number of characters that are returned. You cannot return characters beyond the maximum size of StringExpression (remember that trailing spaces in fields and workareas are ignored).

This function works in a similar way as the [ ] notation, which you can use to return a single character from a string.

Note that you can also use left as a statement, to assign a value to part of a string. This feature is described separately, in the following section.

CategoryString handling
See Also ChrList, Chrs, Compare, Fill, IsNumber, Len, Match, Maxlen, Mid_Function, Remove, Replace, Right_Function], Search_SearchNext, SetLen, SetMaxLen, SortOrder, SubstituteData
Example

This following example displays an Alert dialog with the word "Hello" on it.

string s

s = "Hello World"
Alert Left(s,5)