codeunit

Typekeyword
DictionaryLCS
LibraryLiveCode Script
Syntax
codeunit
Summary

Designates the encoded unit in which a codepoint is stored.

Introduced7.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Example
get codeunit 1 of tString
get the first codeunit of tString
RelatedKeyword: characters, codepoint, codeunits, character, codepoints, bytes, byte
Glossary: keyword
Description

Use the codeunit keyword to refer to the encoded units in which codepoints are stored.

A codeunit is the encoded units in which codepoints are stored (e.g. 16 bit words in UTF-16 or 8-bit bytes in UTF-8). Although the engine currently uses UTF-16 for storage of Unicode text, this should not be relied upon. The byte order of the codeunits depends on the platform and it is not guaranteed that the engine will always use UTF-16 for text storage.

The hierarchy of the new and altered chunk types is as follows:

byte w of codeunit x of codepoint y of char z of word ...

Note: This chunk type is not of general utility.