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

Charlie charlie at ...2793...
Mon Apr 11 18:10:49 CEST 2016


Not sure why but if you add Chr(13) to the TextArea and then save the output
as a file then look at the Hex in the file the Chr(13) is '0A' which is
Chr(10).
The code below works.
*Public Mglobal As String
Public Sub Form_Open() 
TextArea1.text = "Hello" & Chr(13) & "World" & Chr(13) & "Hello " & Chr(13)
& "World" & Chr(13)
File.Save("~/delete.txt", TextArea1.text) 'Have a look at this file in a Hex
viewer
End 
Public Sub Button1_Click()
Mglobal = TextArea1.Text
Mglobal = Replace$(TextArea1.Text, Chr$(10), "|") 
TextArea1.text = Mglobal
End*



--
View this message in context: http://gambas.8142.n7.nabble.com/How-to-replace-chr-13-from-a-text-file-tp55908p55910.html
Sent from the gambas-user mailing list archive at Nabble.com.



More information about the User mailing list