473,397 Members | 1,969 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,397 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 9794
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.