Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / August 2006

Tip: Looking for answers? Try searching our database.

How to  trim 0d0a from string

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ad - 24 Aug 2006 22:53 GMT
I read a string from DataBase, I have there are 0d0a at the end of this
string when display it as HEX.
How can I trim 0d0a from my string?
Alan Pretre - 24 Aug 2006 22:59 GMT
> How can I trim 0d0a from my string?

str.Trim() or str.Replace("\r\n", "")

-- Alan
dongmt@gmail.com - 25 Aug 2006 07:57 GMT
str=str.substring(0,str.lenght-4)//
delete 4 chars in the end of str
Alfa & Omega - 24 Aug 2006 23:01 GMT
| I read a string from DataBase, I have there are 0d0a at the end of this
| string when display it as HEX.
| How can I trim 0d0a from my string?

Just use:

myString.TrimEnd(char[] trimChars)

hope this helps!

Igor

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.