Date:  11/23/2001 02:49:30 AM Msg ID:  000157
From:  Oleg Goncharuk Thread:  000157
Subject:  VFP6 bug?
We had found, that VFP6 function STRTRAN behaves strangely with large files.

Often we need to display pieces of HTML or XML code on page and use following code for this:
   cHTM=STRTRAN(cHTM,"<","&lt;")
   cHTM=STRTRAN(cHTM,">","&gt;")
It works quick with small pieces of code, but once we had tried to convert a large text (about 140Kb)  heavily loaded with tags (it was exported from MSWORD) and we where astonished to see that it took about 15 minutes!

SOLUTION:

We had created RegExp object like this CREATEOBJECT("VBScript.RegExp")
wrote with it function similar by input parameters with VFP STRTRAN and run it against the same file with same parameters - it went like a flash...

/Oleg