anchor.diff:    pos := start;
     temp := TStringBuilder.Create();
     try
  -    while (pos < s.length) do
  +    while (pos < Length(s)) do
       begin
         mt := getToken(s, pos);
         if (token <> mtNONE) and ((mt = token) or ((token = mtEM_STAR) and (mt = mtSTRONG_STAR)) or ((token = mtEM_UNDERSCORE) and (mt = mtSTRONG_UNDERSCORE))) then
  
positive.code: 
          if (isLinkRef) then
          begin
            if (id.ToLower = '$profile$') then
            begin
              FuseExtensions := link.ToLower = 'extended';
              Femitter.FuseExtensions := FuseExtensions;
              lastLinkRef := nil;
            end
            else
            begin
              // Store linkRef and skip line
              lr := TLinkRef.Create(link, comment, (comment <> '') and (link.length = 1) and (link[1 + 1] = '*'));
              Femitter.addLinkRef(id, lr);
              if (comment = '') then
                lastLinkRef := lr;
  
negative.code: 
          if (found) then
          begin
  //          id := value.substring(start, p).trim(); PSTfix
            id := Trim( Copy(value, start + 1, p));
            if (leading <> 0) then
            begin
  //            value := value.substring(0, leading) + value.substring(leading, start - 2).trim(); PSTfix
              value := Copy(value, 1, leading) + Trim( Copy( value, leading + 1, start -2));
            end
            else
            begin
  //            value := value.substring(leading, start - 2).trim();  PSTFix
              value := Trim( Copy(value, leading +1, start -2));
            end;
            trailing := 0;
            if (Length(id) > 0) then
              exit(id)
            else
              exit('');
  