473,320 Members | 2,189 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

deleting carriage return and linefeed characters from astring

Hi,

I have a simple question but i can't solve it simple. How can i remove
carriage returns and linfeed characters , \n\r, form a string?

Thanks,
Andre
Nov 15 '05 #1
4 9790
You could try myStr.Replace("\n\r", "");

"Maxxam" <ma****@planet.nl> wrote in message
news:40**********************@nova.planet.nl...
Hi,

I have a simple question but i can't solve it simple. How can i remove
carriage returns and linfeed characters , \n\r, form a string?

Thanks,
Andre

Nov 15 '05 #2
You could try myStr.Replace("\n\r", "");

"Maxxam" <ma****@planet.nl> wrote in message
news:40**********************@nova.planet.nl...
Hi,

I have a simple question but i can't solve it simple. How can i remove
carriage returns and linfeed characters , \n\r, form a string?

Thanks,
Andre

Nov 15 '05 #3
Yes, it's simple. I did it the hard way:
SubStr = SubStr.Remove(SubStr.IndexOf("\r\n",0,SubStr.Lengt h),4);

Thanks,

Andre

"Peter Rilling" <pe***@nospam.rilling.net> schreef in bericht
news:ub**************@TK2MSFTNGP10.phx.gbl...
You could try myStr.Replace("\n\r", "");

"Maxxam" <ma****@planet.nl> wrote in message
news:40**********************@nova.planet.nl...
Hi,

I have a simple question but i can't solve it simple. How can i remove
carriage returns and linfeed characters , \n\r, form a string?

Thanks,
Andre


Nov 15 '05 #4
Yes, it's simple. I did it the hard way:
SubStr = SubStr.Remove(SubStr.IndexOf("\r\n",0,SubStr.Lengt h),4);

Thanks,

Andre

"Peter Rilling" <pe***@nospam.rilling.net> schreef in bericht
news:ub**************@TK2MSFTNGP10.phx.gbl...
You could try myStr.Replace("\n\r", "");

"Maxxam" <ma****@planet.nl> wrote in message
news:40**********************@nova.planet.nl...
Hi,

I have a simple question but i can't solve it simple. How can i remove
carriage returns and linfeed characters , \n\r, form a string?

Thanks,
Andre


Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Pia | last post by:
Please help! I'm trying to get my xsl to produce 0x0D, not just 0x0A. Any ideas on how to do this? Right now, if I try the following, my output only shows 0x0a: <xsl:variable name="cr"...
1
by: wschaub | last post by:
Is there any way of forcing an ASMX web service not to translate a carriage return – line feed (\r\n) with a (\n\n), in other words the carriage return \r is replaced with a \n if contained as...
2
by: Paradigm | last post by:
I want to insert a carriage return into a text field. I am using insert into and \n for newline. The MYSQL database is accessed by a MS Access front end and the text field appears with a small...
0
by: Maxxam | last post by:
Hi, I have a simple question but i can't solve it simple. How can i remove carriage returns and linfeed characters , \n\r, form a string? Thanks, Andre
2
by: Abhi | last post by:
I have a simple Combo box on my Form, Data in it is Coming from database, Data is stored in database Through a form where i am using Textbox to enter data The Source data to combobox contains...
2
by: Matt Mercer | last post by:
Hi all, I am having a frustration problem, and I have read about 25 newsgroup postings that do not have a satisfying answer :) The problem appears to be common where carriage returns are lost...
0
by: J.Marsch | last post by:
I am having a problem in which ASP.Net web services are corrupting my data. I know that my problem is related to the standard way of encoding carriage return linefeeds, so I need to figure out how...
2
by: dancer | last post by:
Using ASP.Net and VB.net I have textboxes (<asp:textbox id......>) in which the user will be entering paragraphs. They are multiline (several rows and several columns). The carriage returns...
5
by: vflyer | last post by:
I there a quick routine that removes trailing newline chars and carriage return? vFlyer Labs http://www.vflyerlabs.com
4
by: whitej77777 | last post by:
I am trying to write a user defined function that will allow me to strip off the last carriage return and line feed from a text field. We have address fields stored in a text field for our ERP...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.