F_BA_CutPostfixNum2L

F_BA_CutPostfixNum2L 1:

The function F_BA_CutPostfixNum2L removes a numeric suffix from a string if the string ends with digits. The removed numeric suffix is returned in nNumber, and the string is null-terminated at the separation point.

Syntax

FUNCTION F_BA_CutPostfixNum2L : BOOL

VAR_INPUT
  sValue  : POINTER TO STRING;
  nValue  : UDINT := 0;
END_VAR
VAR_OUTPUT
  nNumber : UDINT;
END_VAR

F_BA_CutPostfixNum2L 2: Inputs

Name

Type

Description

sValue

POINTER TO STRING

A string from which the numeric suffix is removed.

nValue

UDINT

Length of the string without a null termination. If the value is 0, the length is determined automatically.

F_BA_CutPostfixNum2L 3: Outputs

Name

Type

Description

nNumber

UDINT

Number removed at the end of the string.