Home  |  Index  |  Dotnet4all Snippets  |  Submit resources
About  |  Mail us  
Dotnet4all Logo

  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








 
Previous Posts
    - Multi-Lingual application
    - HasChanges not being updated?
    - VB6 conversion of UDT to structure - ValueType?
    - Deployment question
    - Can a VB.NET 2003 project work with framework 1.0?...
    - .Net Assembly via VBS
    - Need to include original DLL with Interop?
    - Datagrid with a combobox
    - Passing variables from page to control
    - Error: Argument 'Prompt' cannot be converted to ty...

Archives
    - 10/03/2004 - 10/10/2004
    - 10/10/2004 - 10/17/2004
    - 10/17/2004 - 10/24/2004
    - 10/24/2004 - 10/31/2004
    - 10/31/2004 - 11/07/2004
    - 11/21/2004 - 11/28/2004
    - 11/28/2004 - 12/05/2004
    - 12/05/2004 - 12/12/2004
    - 12/12/2004 - 12/19/2004
    - 12/19/2004 - 12/26/2004
    - 12/26/2004 - 01/02/2005
    - 01/23/2005 - 01/30/2005
    - 01/01/2006 - 01/08/2006
    - 09/24/2006 - 10/01/2006


Disclaimer & Terms of Use  | DotNet4All.Com concept & © 2004 - 2007 by  Zelders²  - Holland