F_BA_OffsetPrefix2L

F_BA_OffsetPrefix2L 1:

The F_BA_OffsetPrefix2L function removes a prefix from the beginning of a string, if one exists. This shifts the string pointer to the first character following the prefix.

Syntax

FUNCTION F_BA_OffsetPrefix2L : BOOL
VAR_IN_OUT
  sString : POINTER TO STRING;
END_VAR
VAR_INPUT
  sPrefix : POINTER TO STRING;
  nPrefix : UDINT := 0;
END_VAR

F_BA_OffsetPrefix2L 2: Inputs/outputs

Name

Type

Description

sString

POINTER TO STRING

A string whose beginning is shifted.

F_BA_OffsetPrefix2L 3: Inputs

Name

Type

Description

sPrefix

POINTER TO STRING

Prefix to be removed.

nPrefix

UDINT

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