StuSprintf (FUN) ¶ FUNCTION StuSprintf : INT Does a sprintf for the given format string and the given variable. Will not return NULL! InOut: Scope Name Type Comment Return StuSprintf INT Input pstFormat POINTER TO STRING the formatstring pVarAdr POINTER TO DWORD the address of the variable that shall be printed udiVarType __SYSTEM.TYPE_CLASS the type of the variable as a __SYSTEM.TYPE_CLASS value pBuffer POINTER TO BYTE the buffer where the text is to be printed dwBufferSize UDINT the size of the buffer in bytes
StuSprintfW (FUN) ¶ FUNCTION StuSprintfW : INT Does a sprintf for the given format string and the given variable. Will not return NULL! InOut: Scope Name Type Comment Return StuSprintfW INT Input wstFormat POINTER TO WSTRING the formatstring pVarAdr POINTER TO DWORD the address of the variable that shall be printed udiVarType __SYSTEM.TYPE_CLASS the type of the variable as a __SYSTEM.TYPE_CLASS value pBuffer POINTER TO BYTE the buffer where the text is to be printed dwBufferSize UDINT the size of the buffer in bytes, not in wstring characters!
UTF8 ¶ ConvertUTF16toUTF8 (Function) ConvertUTF8toUTF16 (Function) GVL_UTF8 (GVL) IsLegalUTF8 (Function) IsSpaceCharacter (Function)
ConvertUTF16toUTF8 (FUN) ¶ FUNCTION ConvertUTF16toUTF8 : UDINT This function converts an UTF-16 string to an UTF-8 string (may be wrong for 3 or 4 character encoded UTF8 characters). InOut: Scope Name Type Comment Return ConvertUTF16toUTF8 UDINT Input sourceStart POINTER TO WORD Pointer to the UTF-16 string to convert targetStart POINTER TO BYTE Pointer to the UTF-8 string the converted string shall be stored to dwTargetBufferSize DWORD The size (in bytes) of the buffer (targetStart) the result shall be stored in bStrictConversion BOOL Do not continue on illegal characters
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
CharBufferString.CopyFrom (METH) ¶ METHOD CopyFrom Does a strcpy from the source string cbsSource into our instance at given positions and a given length. Note: No terminating 0 will be appended. InOut: Scope Name Type Comment Input rcbsSource REFERENCE TO CharBufferString The source string, where the characters will be copied from diSourceOffset DINT The 1 relative offset within the source string, where the copying will start diTargetOffset DINT The 1 relative offset within the source string, where the copying to will start diCountCharacters DINT The number of characters to copy