StrCaseCmpEndA (FUN) ¶ FUNCTION StrCaseCmpEndA : INT Does a case insensitive 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 StrCaseCmpEndA INT Input pString CharBufferPtr Pointer to the string to check. pSuffix CharBufferPtr Pointer to the suffix to find.
StrCaseCmpStartA (FUN) ¶ FUNCTION StrCaseCmpStartA : INT Does a case insensitive 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 StrCaseCmpStartA INT Input pString CharBufferPtr Pointer to the string to check. pPrefix CharBufferPtr Pointer to the prefix to find.
StrCaseFindA (FUN) ¶ FUNCTION StrCaseFindA : INT Similar semantics as Find from the standard.library. Does a case insensitive search. A null pointer will lead to a return of -1 InOut: Scope Name Type Comment Return StrCaseFindA INT Input pst1 POINTER TO STRING(255) pst2 POINTER TO STRING(255) uiSearchStart UINT a position relative to 1, where the search starts
StrCmpA (FUN) ¶ FUNCTION StrCmpA : INT Does a case sensitive comparison of two strings Return values: 0 -> the strings are equal -1 -> pwd1 is less than pwd2 1 -> pwd1 is larger than pwd2 InOut: Scope Name Type Return StrCmpA INT Input pby1 POINTER TO BYTE pby2 POINTER TO BYTE
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
ConvertUTF8toUTF16 (FUN) ¶ FUNCTION ConvertUTF8toUTF16 : UDINT This function converts an UTF-8 encoded string to an UTF-16 encoded string (may be wrong for 3 or 4 character encoded UTF16 characters). InOut: Scope Name Type Comment Return ConvertUTF8toUTF16 UDINT Input sourceStart POINTER TO BYTE Pointer to the UTF-8 string to convert targetStart POINTER TO WORD Pointer to the WSTRING the result shall be stored in dwTargetBufferSize DWORD The size (in bytes) of the buffer (targetStart) the result shall be stored in bStrictConversion BOOL Do not continue on illegal characters