length

length(): Integer;

The length method of the StringUtf8 primitive type returns the current number of characters of the receiver. The following example shows the use of the length method.

vars
    str8 : StringUtf8;
begin
    str8 := @"hello world";
    write str8.length;     // Outputs 11
end;