StrCmpEndA (FUN) ¶ FUNCTION StrCmpEndA : INT Does a case sensitive comparison of the end of the string and the suffix Return values: 0 -> end of the string and suffix are equal -1 -> end of the string and suffix are NOT equal -2 -> Error: An invalid string (ie. Null-Pointer is given) InOut: Scope Name Type Comment Return StrCmpEndA INT Input pString CharBufferPtr Pointer to the string to check. pSuffix CharBufferPtr Pointer to the suffix to find.
StrCmpStartA (FUN) ¶ FUNCTION StrCmpStartA : INT Does a case sensitive comparison of the start of the string and the prefix Return values: 0 -> start of the string and prefix are equal -1 -> start of the string and prefix are NOT equal -2 -> Error: An invalid string (ie. Null-Pointer is given) InOut: Scope Name Type Comment Return StrCmpStartA INT Input pString CharBufferPtr Pointer to the string to check. pPrefix CharBufferPtr Pointer to the prefix to find.
StrConcatA (FUN) ¶ FUNCTION StrConcatA : BOOL This function concatenates 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 StrConcatA BOOL Input pstFrom CharBufferPtr simply a pointer to byte pstTo CharBufferPtr simply a pointer to byte iBufferSize INT the buffer size of pstTo
StrCpyA (FUN) ¶ FUNCTION StrCpyA : DINT Does a strcpy from the source string pStr to the buffer pBuffer. pBuffer must not be NULL! Will return the number of copied characters including the terminating ‘\0’ or “\0” InOut: Scope Name Type Comment Return StrCpyA DINT Input pBuffer CharBufferPtr iBufferSize DINT the size in bytes of the buffer pStr CharBufferPtr the source as a pointer to string
StrDeleteA (FUN) ¶ FUNCTION StrDeleteA Deletes <iLength> characters of <pwst>, beginning at the <iPosition>-th character position. <iPosition> = 1 is the first character. This function has been adapted from StrDeleteW InOut: Scope Name Type Input pby POINTER TO BYTE iLength INT iPosition INT
StrFindA (FUN) ¶ FUNCTION StrFindA : INT Similar semantics as Find from the standard.library. A null pointer will lead to a return of -1 InOut: Scope Name Type Comment Return StrFindA INT Input pst1 POINTER TO STRING(255) pst2 POINTER TO STRING(255) uiSearchStart UINT a position relative to 1, where the search starts
StrIsNullOrEmptyA (FUN) ¶ FUNCTION StrIsNullOrEmptyA : BOOL This function determines if the given string is null or empty InOut: Scope Name Type Comment Return StrIsNullOrEmptyA BOOL Input pstData CharBufferPtr simply a pointer to byte
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