F_BA_CutPostfixNum2L

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
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. |
Outputs
Name | Type | Description |
|---|---|---|
nNumber | UDINT | Number removed at the end of the string. |