-
Strip vbNewLine.
Hey Folks,
I am new to VB.net and I want to be able to strip out new lines from the end of paragraphs... ie:
=======================
Here is a line of text.
I want to keep the line break above this one.
I do not want to keep the three blank lines below this line...
=======================
I know that I could just strip out the lines, but I want to keep the ones that actually make sense and delete the extras at the bottom...
Thanks.
vs
-
Dim TrimChars() As Char = {Chr(13), Chr(10)}
theText = theText.TrimEnd(TrimChars)
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
That didn't work for some reason?
-
Worked for me. Can you post the code you used to test it?
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks