[Gambas-user] How to replace chr$(13) from a text file

Jose Monteiro jf.monteiro at ...43...
Tue Apr 12 11:19:40 CEST 2016


Thank you, Rolf.
 

    On Tuesday, April 12, 2016 5:51 AM, Rolf-Werner Eilert <eilert-sprachen at ...221...> wrote:
 

 The New Line in Linux is chr$(10), not chr$(13).

So here the Replace will not find anything:

Am 11.04.2016 17:18, schrieb José Monteiro:
> By now I tried to use:
>
> Mglobal.info = Replace$(TextArea1.Text, Chr$(13), "|")
>
> Unfortunately, the global variable "info" still has new lines and a parser
> refuses to accept it.

When you use Chr$(10) instead, it will run as expected. The "\n" in 
Linux means Chr$(10), just like gb.NewLine.

If you had a Windows text file, it would be Chr$(10) Chr$(13) instead 
and you would have to delete both. But in a pure Windows environment, a 
"\n" would mean this automatically.

Regards
Rolf


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

  


More information about the User mailing list