The _stringlib class is contained in the _utility class library
(_utility.vcx) located in the \ffc subdirectory of the Visual FoxPro
installation directory. Open the _utility class library and select the
_stringlib class. Select the Trimcrlf method and change the code to read as
follows:
LPARAMETERS tcstring,tltrimleft,tltrimright
#DEFINE CR CHR(13)
#DEFINE LF CHR(10)
LOCAL lcstring
lcstring=tcstring
IF tltrimleft
DO WHILE LEFT(lcstring,1)==CR OR LEFT(lcstring,1)==LF
lcstring=LTRIM(SUBSTR(lcstring,2))
ENDDO
ENDIF
IF tltrimright
DO WHILE RIGHT(lcstring,1)==CR OR RIGHT(lcstring,1)==LF
lcstring=TRIM(LEFT(lcstring,LEN(lcstring)-1))
ENDDO
ENDIF
RETURN lcstring
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
This bug was corrected in Visual Studio 6.0 Service Pack 3.
For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:
194022
(http://support.microsoft.com/kb/194022/EN-US/
)
INFO: Visual Studio 6.0 Service Packs, What, Where, Why
194295
(http://support.microsoft.com/kb/194295/EN-US/
)
HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.