fpc/tests/tbf/tb0161.pp
fpc 790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00

20 lines
312 B
ObjectPascal

{ %fail }
uses Strings;
Function PosEx(const SubStr, S: string; Offset: Cardinal): Integer;
var i : pchar;
begin
if (offset<1) or (offset>length(s)) then exit(0);
i:=strpos(@s[1],@substr[offset]);
if i=nil then
PosEx:=0
else
// This should be forbidden
PosEx:=(i-s)+offset;
end;
begin
end.