F_BA_StrLeft2L

F_BA_StrLeft2L 1:

The function F_BA_StrLeft2L returns the left part of a string up to a given delimiter.

Syntax

FUNCTION F_BA_StrLeft2L : BOOL
VAR_INPUT
  sString    : POINTER TO STRING;
  nString    : UDINT := 0;
  sSeparator : POINTER TO STRING;
END_VAR
VAR_OUTPUT
  sResult : STRING;
END_VAR

F_BA_StrLeft2L 2: Inputs

Name

Type

Description

sString

POINTER TO STRING

String to be evaluated.

nString

UDINT

Length of the string. If the value is 0, it is determined automatically.

sSeparator

POINTER TO STRING

Delimiter for the decomposition.

F_BA_StrLeft2L 3: Outputs

Name

Type

Description

sResult

STRING

The left substring up to the delimiter.