About compression - look at DelphiZip component (you can find one and other components on www.torry.ru)
Main Topics
Browse All Topicsi would like to no, im looking for a function which can scan 1 string, to see if the second string text is contained within the first one, something like
if containsstring('world','he
showmessage('yes world is contained within the text hello world')
else
showmessage('no, the word world could not be found in the text hello world');
this is just an example of wot i mean, i tried instr(); but this does not scan all the words, it doesn't work proper, can anyone help,
also, i just wont some component or function which can compress files or text files, but i dont want it to be like this
compress.infile := 'C:\file.rtf';
compress.outfile := 'C:\file2.rtf';
compress.compress;
or something like that, just a simple
compress.filename := 'C:\file.rtf';
compress.compress;
is what i need, can anyone help ??
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
About compression - look at DelphiZip component (you can find one and other components on www.torry.ru)
this containstring works, only if i do this
if containsstring('world','he
showmessage('yes world is contained within the text hello world')
else
showmessage('no, the word world could not be found in the text hello world');
but if i do this (notice the strings)
if containsstring('world','no
showmessage('yes world is contained within the text hello world')
else
showmessage('no, the word world could not be found in the text hello world');
it doesnt detect it, see, this is what im trying to figure out
I think you should modify the above function as
function containsstring(Pattern,Dat
begin
If IsCaseSensitive
Then Result := Pos(Pattern,Data) >0
Else Result := Pos(AnsiUpperCase(Pattern)
end;
This will return true or false instead of the position as suggested by lmikle above
abbasakhtar:
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:
to split points between lmikle and earlrainer
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
If you will get a useful answer to your newer question next time, please accept it after evaluating. By this way the experts will get sooner his expert points for supporting you. If you have question about, please look at http://www.experts-exchang
kacor
EE Cleanup Volunteer
Business Accounts
Answer for Membership
by: lmiklePosted on 2003-04-18 at 05:40:00ID: 8353712
try this:
a : String; IsCaseSensitive : Boolean) : Integer; ,AnsiUpper Case(Data) );
function containsstring(Pattern,Dat
begin
If IsCaseSensitive
Then Result := Pos(Pattern,Data)
Else Result := Pos(AnsiUpperCase(Pattern)
end;
This function return a position of Pattern in Data (1 based) or 0 if Pattern wasn't found in Data. Also, it's have 2 modes: case sensitive and not.