Go to most recent revision | Blame | Last modification | View Log | RSS feed
# J<^ñ BinarySafeReplace <pBinarySafeReplace.pas; dSystem fstring¶+{f
AnsiString¶+{fInteger fÂgExit gUniqueStringU3gLength g@LStrLenrÅX[û gTruevÉøgBreak gPred g SetLength g@LStrSetLengthé`pÅgMove=Éiðg@UniqueStringAAKygInc fBooleanúefPLongintËÉg@LStrToPChar$ÉÇg @LStrLAsgÔg@LStrAsgÔg@LStrClr\ª«>g@HandleFinallyé`pÅfTObject|ê®ìgTObject.Free¢
ĄcdSysInit cdStrUtils cdSysUtils g
FileExists'h'&gForceDirectories'h'&gExtractFilePathӢ}Gg
fmOpenRead¬}ç1gfmShareDenyWrite~ç1cdClasses fTFileStream4¸îµg.TFileStreamÌgTFileStream.CreateZØNgTStream.SetPositionÒïf THandleStreamçõ]'gfmCreate*r2cePosEx g_PosExBc5BinarySafeReplace _¸Ïc5System c5SysInit 6c5StrUtils 8c5SysUtils :c5Classes Fc7.1F 5PosEx Tc(StringReplacesBinarySafe CaìÈ "AString !ASearchPatternb !AReplaceWithb Resultf iPos lastposf ueberhang
. . .f .f ( .f 0 .f 8 .f @ .f H .f P . .f X .f ` .f h .f p .f x .f .f c(StringReplaceBinarySafe ÔM% Ä !AString !ASearchPattern !AReplaceWith
#Result&