From Clomosy Docs

Revision as of 11:30, 27 February 2023 by ClomosyManager (talk | contribs) (Created page with " function Copy(Source string; StartChar, Count Integer):string; The copy function provides copying of a value. Creates a new array from part of an existing array.<br> String copy:<br> The index of the first character of a string is = 1. Count characters are copied from the StartChar of the Source string to the returned string. Less than Count characters if the end of the Source string is encountered before the Count characters are copied.<br> '''Example:'''<br> ''...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

function Copy(Source string; StartChar, Count Integer):string;

The copy function provides copying of a value. Creates a new array from part of an existing array.

String copy:

The index of the first character of a string is = 1. Count characters are copied from the StartChar of the Source string to the returned string. Less than Count characters if the end of the Source string is encountered before the Count characters are copied.

Example:

var
  Source, Target : string;
begin Source := '12345678'; Target := Copy(Source, 3, 4); ShowMessage('Target : '+Target); end;

Output:

Target : 3456