size : 380 uploaded_on : Sat Feb 13 00:00:00 1999 modified_on : Wed Dec 8 14:03:34 1999 title : Search and Replace org_filename : sea_repl.pas author : Public Domain authoremail : description : simple search & replace for strings. (no regular expressions) keywords : tested : BP7 submitted_by : The CKB Crew submitted_by_email : ckb@netalive.org uploaded_by : nobody modified_by : nobody owner : nobody lang : pas file-type : text/plain category : pascal-alg-sortsearch __END_OF_HEADER__ function SearchAndReplace( sSrc, sLookFor, sReplaceWith : string ) : string; var nPos, nLenLookFor : integer; begin nPos := Pos( sLookFor, sSrc ); nLenLookFor := Length( sLookFor ); while(nPos > 0)do begin Delete( sSrc, nPos, nLenLookFor ); Insert( sReplaceWith, sSrc, nPos ); nPos := Pos( sLookFor, sSrc ); end; SearchAndReplace := sSrc; end;