473,327 Members | 2,090 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,327 software developers and data experts.

ctrl line-feed

Tim
How do I create a string that contains a carriage return line feed in the
middle. For example:

"string 1" + crlf + "string 2"

would output:
string1
string2

Thanks in advance for your help.
Nov 15 '05 #1
3 2208
"string 1\r\nstring 2"
\r is CR
\n is LF

"Tim" <ti******@yahoo.com> a écrit dans le message de
news:%2****************@tk2msftngp13.phx.gbl...
How do I create a string that contains a carriage return line feed in the
middle. For example:

"string 1" + crlf + "string 2"

would output:
string1
string2

Thanks in advance for your help.

Nov 15 '05 #2
You can also use Environment.NewLine that will also work for richtexboxes
and console, etc.

--
William Stacey, MVP

"Tim" <ti******@yahoo.com> wrote in message
news:#A**************@tk2msftngp13.phx.gbl...
How do I create a string that contains a carriage return line feed in the
middle. For example:

"string 1" + crlf + "string 2"

would output:
string1
string2

Thanks in advance for your help.

Nov 15 '05 #3
William Stacey <st***********@mvps.org> wrote:
You can also use Environment.NewLine that will also work for richtexboxes
and console, etc.


However, be warned that that may not be CRLF on some platforms. When
CRLF is called for by a protocol, you should use \r\n, not
Environment.NewLine.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #4

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

Similar topics

8
by: Mike Maxwell | last post by:
<vent> I see there has been traffic over the years on this gripe, so just let me vent my frustration, and add another reason why 'exit' (or possibly exit() or quit() or halt() or some such) should...
4
by: Scott | last post by:
I am using a TCPIP connection to communicate over port 23 (telnet) to a server, and I am having to mimic normal command line interface you owuld see in a telnet session (i.e. I have to write to...
8
by: MLH | last post by:
I use a mouse-down procedure to trap right mouse clicks and CTRL-Right mouse clicks. Running the procedure must put honey or some other sticky substance into my keyboard because subsequent...
2
by: s99999999s2003 | last post by:
hi i have a program that works very similar to tail -f in Unix It will need a Ctrl-C in order to break out of the program. I wish to run this program using python (either thru os.system() or some...
8
by: cj | last post by:
Has MS included in VB2005 any multi-line comment methods like in C? /* This is a multi-line comment in C */ It's something I'd like to have. I did read somewhere that I could use Ctrl+K,...
2
by: Paul Cheetham | last post by:
Hi, If I start a multi-line comment in a c# file with /* then when I press enter, I get an asterisk indented on the next line. I want to prevent this from happening, as it's getting really...
21
by: Zytan | last post by:
Instead of Ctrl+Y redoing what's stored in 'future history', it REPLACES that information (which will then be forever lost) with a new command: delete current line. This shortcut is so ridiculous...
3
by: Daniel Clark | last post by:
I have a Windows command line based application that only shuts down cleanly if it sees "CTRL-C" on the console. I need to automate the running of this application, but still allow the user sitting...
2
by: thanhnh | last post by:
Hi. I have to write a simple Shell with History feature. First, I get a string from command line. The command line is split into tokens. And then, I call fork ( ) to create a new process. The child...
2
by: Logic | last post by:
Hi, I'm writing a console program in order to make my own keyboard shortcuts. ConsoleKeyInfo input; do { if (File.Exists("info.txt") == true) ; else Console.WriteLine("File...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
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...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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)...
1
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

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.