Link to home
Start Free TrialLog in
Avatar of ST3VO
ST3VOFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Code Assistance Needed Not working)

Hi all,

I've put together this procedure that is mean't to change all html Tags in a TSynMemo component ...called Memo1 to lowercase.

For some reason it's not downing anything ...could someone help please?

thx

st3vo
Avatar of ST3VO
ST3VO
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

downing  := doing ... exuse my spelling :o)
You have to attach the procedure so that we have something to have a look at... :)
Avatar of ST3VO

ASKER

oopsss sorry :o)  

Here is it:
////////////////////////////////////////
//  CONVERT ALL TAGS TO LOWER CASE
///////////////////////////////////////
Procedure TForm1.LowercaseHtmlTags;
var
  taglist : TStringList;
  i       : Integer;
begin
  taglist.Add('DIV');
  taglist.Add('HEAD');
  taglist.Add('TITLE');

  for i := 0 to taglist.Count-1 do
  memo1.text := stringreplace(memo1.Text, '<' + taglist[i], '<' + lowercase(taglist[i]), [rfReplaceAll, rfIgnoreCase]);
end;

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Hypo
Hypo
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ST3VO

ASKER

Perfect Thanks!!! :o)