Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if Pos('%', s) = 0 then begin
- Result := s;
- exit;
- end;
- sb.Init;
- i := 1;
- while (i <= Length(s)) do begin
- c := s[i];
- if c = '%' then begin
- c := Chr(StrToInt('$' + Copy(s, i + 1, 2)));
- Inc(i, 2);
- end;
- sb.Add(c);
- Inc(i);
- end;
- Result := sb.Value
Add Comment
Please, Sign In to add comment