LEFT

From the left end of strings, yields the number of characters defined.
lrsf_le1_cam5
Arguments
IN
IN
MESSAGE
Any non-empty string
NbC
NbC
DINT
Number of characters to be extracted. This number cannot be greater than the length of the IN string.
LEFT
Q
MESSAGE
Left part of the IN string (its length = NbC)
empty string if NbC <= 0
complete IN string if NbC >= IN string length
Example
(* FBD Program using "LEFT" and "RIGHT" Functions *)
lrsf_le2_cam5
(* ST Equivalence: *)
complete_string := INSERT (RIGHT ('12345678', 4), LEFT ('12345678', 4), 5); (* complete_string is '56781234' the value issued from RIGHT call is '5678' the value issued from LEFT call is '1234' *)
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal