How to Remove Newline character from a VB String

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Mar 2007
Posts: 2
Reputation: ashok_paswan is an unknown quantity at this point 
Solved Threads: 1
ashok_paswan ashok_paswan is offline Offline
Newbie Poster

Re: How to Remove Newline character from a VB String

 
0
  #11
Apr 18th, 2007
Originally Posted by WolfPack View Post
Hi,
How do you delete a newline character that is inside a VB string? Apparently Trim removes only spaces.

Thanks in Advance.
use this
replace(vbstring,vbnewline,"")
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 319
Reputation: DenisOxon is an unknown quantity at this point 
Solved Threads: 15
DenisOxon's Avatar
DenisOxon DenisOxon is offline Offline
Posting Whiz

Re: How to Remove Newline character from a VB String

 
0
  #12
Jul 2nd, 2007
Originally Posted by Comatose View Post
It's a problem with my code (BAH):
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. if right(SearchString, 1) = chr(13) or right(SearchString, 1) = chr(10) then
  2. ' /* Should be Left, Not Right */
  3. SearchString = left(SearchString, len(SearchString) -1)
  4. end if

I assume you will run this if statement twice because you could have both characters at end of line ?

Denis
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC