StrLenA (FUN) ¶ FUNCTION StrLenA : DINT This function determines the length of a string by searching for a terminating zero character. The function will do its work either with native IEC-Strings or with strings coming from external functions. It will return -1 if the given pointer to String is equal NULL InOut: Scope Name Type Comment Return StrLenA DINT Input pstData CharBufferPtr simply a pointer to byte
StrMidA (FUN) ¶ FUNCTION StrMidA Return <iLength> characters of <pst>, beginning at the <iPosition>-th character position. <iPosition> = 1 is the first character. This function has been adapted from StrMidW InOut: Scope Name Type Comment Input pst POINTER TO BYTE uiInputBufferSize UINT The size of the buffer, where pwst points to iLength INT iPosition INT pstResult POINTER TO BYTE The buffer, where the result will be returned uiResultBufferSize UINT The size of the buffer (in bytes), where the result will be returned
StrPadLeftA (FUN) ¶ FUNCTION StrPadLeftA : BOOL This function generate a padding string and concatenates it with pstFrom to pstTo if the iBufferSize from pstTo is big enough. The function will do its work either with native IEC-Strings or with strings coming from external functions. It will return FALSE and does no concatenation if one of the strings is NULL or the buffer size is not big enough. InOut: Scope Name Type Comment Return StrPadLeftA BOOL Input byPadChar BYTE The padding character filling the space from left pstFrom CharBufferPtr simply a pointer to byte pstTo CharBufferPtr simply a pointer to byte diBufferSize DINT the buffer size of pstTo
StrPadRightA (FUN) ¶ FUNCTION StrPadRightA : BOOL This function generate a padding string and concatenates it with pstFrom to pstTo if the iBufferSize from pstTo is big enough. The function will do its work either with native IEC-Strings or with strings coming from external functions. It will return FALSE and does no concatenation if one of the strings is NULL or the buffer size is not big enough. InOut: Scope Name Type Comment Return StrPadRightA BOOL Input byPadChar BYTE The padding character filling the space from right pstFrom CharBufferPtr simply a pointer to byte pstTo CharBufferPtr simply a pointer to byte diBufferSize DINT the buffer size of pstTo
StrReplaceA (FUN) ¶ FUNCTION StrReplaceA Replaces <iLengthToReplace> characters of pstInput by pstReplaceWith, starting at the <iPosition>-th character position iPosition = 1 is the first character. This function was adapted from function StrReplaceW InOut: Scope Name Type Comment Input pstInput POINTER TO STRING(255) uiInputBufferSize UINT The size of the buffer, where pstInput points to pstReplaceWith POINTER TO STRING(255) iLengthInput INT iLengthToReplace INT iLengthToReplaceWith INT iPosition INT
StrToLowerA (FUN) ¶ FUNCTION StrToLowerA Converts all letters to lower case. InOut: Scope Name Type Comment Input pString CharBufferPtr Pointer to the string.
StrToUpperA (FUN) ¶ FUNCTION StrToUpperA Converts all letters to upper case. InOut: Scope Name Type Comment Input pString CharBufferPtr Pointer to the string.
StrTrimA (FUN) ¶ FUNCTION StrTrimA Remove leading and trailing whitespaces (ASCII 9, 10, 13, 32). InOut: Scope Name Type Comment Input pString POINTER TO BYTE Pointer to the string to be trimmed.
StrTrimEndA (FUN) ¶ FUNCTION StrTrimEndA Remove trailing whitespaces (ASCII 9, 10, 13, 32). InOut: Scope Name Type Comment Input pString POINTER TO BYTE Pointer to the string to be trimmed.
StrTrimStartA (FUN) ¶ FUNCTION StrTrimStartA Remove leading whitespaces (ASCII 9, 10, 13, 32). InOut: Scope Name Type Comment Input pString POINTER TO BYTE Pointer to the string to be trimmed.