Split function not working.....
(Thursday, December 23, 2004)
Found the following interesting discussion in the Newsgroups:
Split function not working..... by:Jay
| So I'm writting this software that talks to an IRC server; and occasionaly IRC servers send back data two lines at a time with lines breaks inside. For my own sanity I had been using the split funciton to break these lines down to seperate ones and then process the server commands etc. However lately the split funciton seems incapable of finding chr(10)+chr(13) and wont split the lines. When I dump the data to a text file however and open it in notepad, notepad recognizes the lines and seperates them.
What is going on and how can I fix it?
| | | Reply: by:Sven Groot
| | | A newline in Windows is chr(13) & chr(10) not the other way around.
Use the ControlChars.CrLf or ControlChars.NewLine constants.
-- Sven Groot
http://unforgiven.bloghorn.com
| | | Reply: by:Jay
| | | Oh Thank You, I thought I was going to loose my mind today :-) | A newline in Windows is chr(13) & chr(10) not the other way around. | | Use the ControlChars.CrLf or ControlChars.NewLine constants. | | -- | Sven Groot | | http://unforgiven.bloghorn.com
|
|
0 Comments:
Post a Comment