On Tue, 25 Jul 2017 10:54:30 +0200, Bo Berglund <bo.bergl...@gmail.com> wrote:
>so I need to write efficient >replacements for certain string functions (Delete, Insert, Copy etc). What I am now up aginst after a few days work is to find how to code the Pos() function for strings... The comm buffer apparently contains the 2-char string as indication of the last and the existing code uses Pos() to find it. What about something like: function PosBytes(SearchItem, Target: TBytes): integer; begin ????? end; What could I use inside the body of this function to mimik the string function Pos (for AnsiStrings)? -- Bo Berglund Developer in Sweden _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal