Livecode Wiki
Advertisement

Designates a single character as part of a chunk expression.

Synonym: char

Examples:

get char 1 of field "Answers"
put char 12 to 14 of it into oldAnswer

Use the character keyword to refer to a specific character or characters in a container.

A character refers to what would naturally be thought of as a single graphical character, even if it is composed of multiple sub-units, as in some accented text or Korean ideographs.

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: In versions prior to 7.0 the byte chunk was identical in functionality to the character chunk. In 7.0 and later a character is not an 8-bit unit and it is (it's 16bit), therefore not appropriate to use this type of chunk expression on binary data, to refer to 8-bit units in binary data use the byte keyword.

See also: chars, codepoint, codeunits, line, word, codepoints, bytes, byte, codeunit

Advertisement