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: