Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
REDUCE() function truncates after about 64K
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
01033943
Message ID:
01033951
Views:
21
>Does anybody have an alternative to the foxtools reduce() function that will handle long strings (100K or more in length)? Thanks.


Not as fast as C++ but you can use this:
FUNCTION Reduce(cString, cReplace)

IF PCOUNT() > 1
   cString = CHRTRAN(cString, cReplace, SPACE(LEN(cReplace)))
ENDIF

DO WHILE "  " $ cString
   cString = STRTRAN(cString, "  ", " ")
ENDDO

RETURN cString
Previous
Reply
Map
View

Click here to load this message in the networking platform