Attention

IronPLC can only run very simple programs. The steps described are accurate but many language features are not yet supported.

LEN

Returns the length of a string.

IEC 61131-3

Section 2.5.1.5.7

Support

Not yet supported

Signatures

#

Input (IN)

Return Type

Support

1

STRING

INT

Not yet supported

2

WSTRING

INT

Not yet supported

Description

Returns the number of characters in IN. For an empty string, the result is 0.

Example

result := LEN('Hello');    (* result = 5 *)
result := LEN('');         (* result = 0 *)

See Also

  • LEFT — left substring

  • RIGHT — right substring

  • MID — middle substring