On Sun, 6 Apr 2025 23:18:47 +0200 Bart via fpc-devel <fpc-devel@lists.freepascal.org> wrote:
> Hi, > > Is this a known issue? > Outputs: > S[0] = "A" [Ok] > S[1] = "B" [Ok] > S[2] = "C" [Ok] > Copy(S,0,1) = "A" [Ok] > Copy(S,1,1) = "A", FAIL: expected: B In the Delphi {$zerobasedstrings on/off} : 1. String's intrinsic functions as Copy, Insert, Delete, etc used always 1-based indexing. 2. StringHelper's functions s.Copy, s.Insert, s.Delete etc used always 0-based indexing. 3. Only direct char indexing s[n] depends on {$zerobasedstrings} directive. -- Kazantsev Alexey _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel