From Clomosy Docs

Revision as of 12:54, 13 February 2024 by ClomosyManager (talk | contribs)

function Length(const SourceString string):Integer;

The length function returns the element count of the number of characters in the SourceString. It is often used to loop around all the characters in a string.

Example:

Base Syntax
 var
   valueStr    : string;
 
 begin
 
   valueStr := 'Clomosy';
   ShowMessage('Length of valueStr = '+IntToStr(Length(valueStr)));
 
 end;
TRObject Syntax
 var
   valueStr    : string;
 
 {
 
   valueStr = 'Clomosy';
   ShowMessage('Length of valueStr = '+IntToStr(Length(valueStr)));
 
 }

Output:

Length of valueStr = 7