CharBufferString.Init (METH) ¶ METHOD Init : BOOL Init method used for using an already existing memory for storing the string InOut: Scope Name Type Comment Return Init BOOL Input pBuffer POINTER TO BYTE The pointer to the buffer containing the string uiBufferSize UINT The size of the buffer (in bytes), where the string is stored. If this value is 0, no memory is allocated and the CharBufferPtr pointer has to be set by calling the Initialize method stringType __SYSTEM.TYPE_CLASS A __SYSTEM.TYPE_CLASS value indicating type of the string
CharBufferString.Initialize (METH) ¶ METHOD Initialize : BOOL Method Initialize must be called in order to pass an already existing CharBufferPtr to this instance. In this case the buffer size is unknown and remains 0. This method can be used if the string is read only. InOut: Scope Name Type Comment Return Initialize BOOL Input cbpSource CharBufferPtr The buffer, where the string is stored this instance represents stringType __SYSTEM.TYPE_CLASS A __SYSTEM.TYPE_CLASS value indicating type of the string
CharBufferString.Insert (METH) ¶ METHOD Insert Inserts <cbsInsert> into this string instance after the <iPosition>-th character position. <iPosition> = 0 inserts before the first character. <iPosition> = 1 inserts after the first character. InOut: Scope Name Type Input cbsInsert REFERENCE TO CharBufferString iPosition INT
CharBufferString.Length (PROP) ¶ PROPERTY Length : DINT Determines the length of the string by searching for a terminating zero character (ie. ‘0’ or “0”). The getter will do its work either with native IEC-(W)Strings or with strings coming from external functions. It will return -1 if the given pointer to String is equal NULL.
CharBufferString.Replace (METH) ¶ METHOD Replace Replaces <iLengthToReplace> characters of our string by cbsReplaceWith, starting at the <iPosition>-th character position iPosition = 1 is the first character. InOut: Scope Name Type Input cbsReplaceWith REFERENCE TO CharBufferString iLengthToReplace INT iPosition INT
CharBufferString.Mid (METH) ¶ METHOD Mid Return <iLength> characters of our string, beginning at the <iPosition>-th character position. <iPosition> = 1 is the first character. The result string is stored in the CharBufferString instance <pstResult> InOut: Scope Name Type Comment Input iLength INT iPosition INT cbsResult REFERENCE TO CharBufferString The CharBufferString instance, where the result will be returned
CharBufferString.StringType (PROP) ¶ PROPERTY StringType : __SYSTEM.TYPE_CLASS A __SYSTEM.TYPE_CLASS value indicating type of the string
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.
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.