MLEN
Yields the length of strings.

Arguments | |||
---|---|---|---|
IN | IN | STRING | Any string |
MLEN | NbC | DINT | Number of characters in the IN string |
Example
(* FBD Program using "MLEN" Function *)

(* ST Equivalence: *)
nbchar := MLEN (complete_string); If (nbchar < 3) Then Return; End_if; prefix := LEFT (complete_string, 3); (* this program extracts the 3 characters on the left of the string and put the result in the prefix string variable nothing is done if the string length is less than three characters *)
Provide Feedback