copy


function copy(str1: string; begin, end: integer): string;

The function returns the substring of the given string which starts at position 'begin' and ends at position 'end'-1. For example, copy('MIDletPascal', 2, 5) returns 'Dle'. Note that this is different from the classic Pascal function copy.

Strings in MIDletPascal are slightly different than strings in regular Pascal: the index of the first character in string is 0 in MIDletPascal.

See also: length, pos