StrToUpperA (FUN) ¶ FUNCTION StrToUpperA Converts all letters to upper case. InOut: Scope Name Type Comment Input pString CharBufferPtr Pointer to the string.
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)
CharBufferString.Capacity (PROP) ¶ PROPERTY Capacity : UINT The size of the buffer (in bytes), where the string is stored.
CharBufferString.CharAt (METH) ¶ METHOD CharAt : BYTE This method returns the character at a specified position. It should be only used to iterate through a string and must not be called for positions after the trailing 0 character. Attention! For instances storing a WSTRING: Valid values are only returned if the character at the given position is an ASCII character InOut: Scope Name Type Comment Return CharAt BYTE Input iPosition INT The position (relative to 1) within the string to check
CharBufferString.CharAtEquals (METH) ¶ METHOD CharAtEquals : BOOL This method tests, if the character at a specified position within the string is equal to a given character. InOut: Scope Name Type Comment Return CharAtEquals BOOL Input iPosition INT The position (relative to 1) within the string to check stChar STRING(1) The character to search
CharBufferString.Characters (PROP) ¶ PROPERTY Characters : CharBufferPtr The buffer, where the string is stored this instance represents
CharBufferString.Copy (METH) ¶ METHOD Copy : DINT Does a strcpy from the source string cbsSource into our instance. Will return the number of copied characters including the terminating ‘0’ or “0” InOut: Scope Name Type Return Copy DINT Input cbsSource REFERENCE TO CharBufferString