var
s, c: string;
i: integer;
begin
s := Memo1.Text;
for i := 1 to length(s) do
begin
if s[i + 4] = 'h' then
begin
c := c + inttohex(not word(strtoint('$' + copy(s, i, 4))), 2);
end;
if (s[i + 4] = 'h')or(s[i + 3] = 'h') or (s[i + 2] = 'h') or (s[i + 1] = 'h') then
else
c := c + s;
end;
Memo2.Lines.Add(c);
可对一个文本取反,要求0x01后要有h