FindAndDeleteChar

The function finds a character, which may occur more than once, in a string and removes it.
The function returns:
- The number of removed characters.
 - The value 0 if the character was not found.
 
The function stops the checking of the input length after Parameterlist.cMaxCharacters characters in order to avoid an infinite loop.
 Return value
Name  | Type  | Description  | 
|---|---|---|
FindAndDeleteChar  | UDINT  | Finds a character that may occur more than once in a string and deletes it  | 
 Inputs
VAR_INPUT
    pSrcString    : POINTER TO STRING;
    sDeleteChar   : STRING(1);
    pDstString    : POINTER TO STRING;
    nDstSize      : UDINT;
END_VARName  | Type  | Description  | 
|---|---|---|
pSrcString  | POINTER TO STRING  | Pointer to the STRING variable whose string is to be searched (input string).  | 
sDeleteChar  | STRING(1)  | Character to be removed.  | 
pDstString  | POINTER TO STRING  | Pointer to the resulting STRING variable (output string)  | 
nDstSize  | UDINT  | Size of the resulting STRING variable (output string) in bytes. The operator SIZEOF() can be used for the assignment.  | 
Requirements
Development environment  | Target platform  | PLC libraries to be integrated (category group)  | 
|---|---|---|
TwinCAT v3.1.4022  | PC or CX (x86, x64, Arm®)  | Tc2_Utilities (System) >=3.3.35.0  |