StrIsNullOrEmptyW (FUN) ¶ FUNCTION StrIsNullOrEmptyW : BOOL This function determines if the given string is null or empty InOut: Scope Name Type Comment Return StrIsNullOrEmptyW BOOL Input pstData CharBufferPtr simply a pointer to byte
StrLenW (FUN) ¶ FUNCTION StrLenW : 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-WStrings 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 StrLenW DINT Input pstData CharBufferPtr simply a pointer to byte
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.
CharBufferPtr (ALIAS) ¶ TYPE CharBufferPtr : POINTER TO BYTE This type will be used for all strings, that the functions of this library can use. Can be interpreted as POINTER TO STRING or POINTER TO WSTRING
CharBufferString (FB) ¶ FUNCTION_BLOCK CharBufferString This function block encapsulates the data of a string based on a byte array, i.e. contains the CharBufferPtr variable pointing to the buffer and the information about the type of (i.e. one-byte string or two-byte string) InOut: Scope Name Type Comment Input m_uiBufferSize UINT The size of the buffer (in bytes), where the string is stored. m_cbpBuffer CharBufferPtr The buffer, where the string is stored this instance represents m_Type __SYSTEM.TYPE_CLASS A __SYSTEM.TYPE_CLASS value indicating type of the string m_AsString POINTER TO STRING(255) Two additional pointers to the buffer used for easier debugging. In the monitoring view the corresponding pointer shows the current value of the buffer as (w)string. m_AsWString POINTER TO WSTRING(255) m_bAllocated BOOL Flag indicating, whether the memory for storing the string was allocated dynamically and has to be freed later Properties: Capacity Characters Length StringType Methods: CharAt CharAtEquals Copy CopyFrom CopyFrom2 Delete FB_Exit FB_Init Find FindFrom FromString Init Initialize Insert Mid Replace Structure: Capacity (Property) CharAt (Method) CharAtEquals (Method) Characters (Property) Copy (Method) CopyFrom (Method) CopyFrom2 (Method) Delete (Method) FB_Exit (Method) FB_Init (Method) Find (Method) FindFrom (Method) FromString (Method) Init (Method) Initialize (Method) Insert (Method) Length (Property) Mid (Method) Replace (Method) StringType (Property)