LEFTPermalink

Provided by standard library.

Left returns the left, initial string for a given string. Input STR is type STRING, SIZE is of type INT, the return value of the function is type STRING.

LEFT (STR, SIZE) means: Take the first SIZE character from the left in the string STR.

Example in Function Block Diagram

LEFT

Example in Structured Text

VarSTRING1 := LEFT ('SUSI',3);

String functions are not "thread safe": When using tasks, string functions may only be used in a single task. If the same function is used in different tasks, there is a danger of overwriting.