Cockpit's String Types

Top  Previous  Next

The following table shows the currently available string types defined in Cockpit with the actions taken on transfers between Xbase++ strings and memory. The string type constants can be found in the file StringTypes.ch.

 

String Type Constant

Memory à Xbase++ String Operation

Xbase++ String à Memory Operation

STRINGTYPE_BINARY

All data is read from memory to the Xbase++ string. No character set conversion is applied. Size information is necessary.

The Xbase++ string is written to memory. No character set conversion is applied. String size information is not required.

STRINGTYPE_BINARY0

All data up to a terminating NULL-byte is read from memory to an Xbase++ string. No character set conversion is applied. The terminating NULL-byte is  not transferred to the Xbase++ string. Separate string size information is not required.

The Xbase++ string is written to memory where a NULL-byte will terminate the data. No character set conversion is applied. Separate string size information is not required.

STRINGTYPE_TEXT

All data up to a terminating NULL-byte is read from memory to an Xbase++ string. Character set conversion is applied as necessary according to the Cockpit application character set (See SetCX) assuming Ansi as source character set. The terminating NULL-byte is not transferred to the Xbase++ string. Separate string size information is not required.

The Xbase++ string is written to memory where a NULL-byte will terminate it. Character set conversion is applied as necessary according to the Cockpit application character set (See SetCX) assuming Ansi as destination character set. Separate string size information is not required.

STRINGTYPE_UNICODETEXT

All data up to a terminating NULL-word is read from memory to an Xbase++ string. Character set conversion is applied according to the Cockpit application character set (See SetCX) assuming Unicode as source character set. The terminating NULL-word is not transferred to the Xbase++ string. Separate string size information is not required.

The Xbase++ string is written to memory where a NULL-word will terminate it. Character set conversion is applied according to the Cockpit application character set (See SetCX) assuming Unicode as destination character set. Separate string size information is not required.