Loading...
 

Left

Left

Left(fmtString, flags), Left(fmtString), Left(STACK , flags), Left(STACK ),Left(, flags), Left

parameters: format string for sprintf, flags for ViewExport

Stack
Stack Position Description
Stack(In) Top any
Top 1 n
Stack(Out) Top (Partial) character string

As with the String statement, any data is transformed from the stack top into a character string, from which a substring containing the first n characters (counted from the left) is then formed. This appears as the result of the operation on the stack-top.

216114
For n ≤ -1 Left is defined as all characters from the left except the last n characters. In other words:
Left(-n) = Left(Cardinality - n)

2 "1234567890" Left // -> "12" 0 "1234567890" Left // -> "" (-3) "1234567890" Left // -> "1234567"  (== 7 Left)
Related topics