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

creating manual line breaks in a single string

I want a script that will force a manual line break after 'N' characters. In
other words, it will take a string, say, strString, and insert manual line
breaks every 78 characters. Anyone have some snippets I can poach?

My e-mailer component will do this for me, but I'd like to know how to do it
"by hand" if necessary.

Thanks,
-KF

Jul 19 '05 #1
2 1391
"Ken Fine" <ke*****@u.washington.edu> wrote in message
news:bv**********@nntp6.u.washington.edu...
I want a script that will force a manual line break after 'N' characters. In other words, it will take a string, say, strString, and insert manual line breaks every 78 characters. Anyone have some snippets I can poach?

My e-mailer component will do this for me, but I'd like to know how to do it "by hand" if necessary.

Thanks,
-KF


http://groups.google.com/groups?selm...TNGP09.phx.gbl
Jul 19 '05 #2

Awesome, Chris, that really did the trick. Very useful function. Thanks so
much!

-KF
"Chris Hohmann" <no****@thankyou.com> wrote in message
news:OX**************@tk2msftngp13.phx.gbl...
"Ken Fine" <ke*****@u.washington.edu> wrote in message
news:bv**********@nntp6.u.washington.edu...
I want a script that will force a manual line break after 'N' characters. In
other words, it will take a string, say, strString, and insert manual

line
breaks every 78 characters. Anyone have some snippets I can poach?

My e-mailer component will do this for me, but I'd like to know how to

do it
"by hand" if necessary.

Thanks,
-KF


http://groups.google.com/groups?selm...TNGP09.phx.gbl

Jul 19 '05 #3

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

Similar topics

1
by: Bill | last post by:
I am downloading data from a website that displays it in a table $fp = fopen("a website page", 'r'); The following accesses the stream one <td> element at a time $myData = fgets($fp); Then I...
1
by: buran | last post by:
Dear ASP.NET Programmers, I am carrying the input of a textbox via querystring. When I put the value of querstring in a label control, the line breaks are removed. The whole text is displayed as...
2
by: Brett | last post by:
I'm writing something similar to this into a text file: txtfileError.WriteLine(CurrentDateTime(1) & " Error in Sub Sub1()" & idvar & Chr(10) & Chr(13) & ex.Message) txtfileError.WriteLine() ...
4
by: Water Cooler v2 | last post by:
Besides embedding <BR/>, like general purpose programming languages, I thought you could embed escape sequences such as \n or \r\n into string arguments to cause line breaks in JavaScript. To...
5
by: joelbyrd | last post by:
Didn't know exactly where to post this, but: How do I get line breaks in a textarea? I'm pulling text from a database, and this text definately has line breaks in it, because I replaced all the...
2
by: caspardh | last post by:
i was trying to code a morse code decipherer which workd fine except that the .txt file that i was converting had linebreaks built in, i cant get python to ignore the line breaks and i cant find any...
4
by: Rock | last post by:
Hello, I am going bananas trying to get text breaks and empty lines into this text which is sent in an email. I have tried "'s and \n and r\n\ but the text in the email still wraps and also I...
1
by: www.douglassdavis.com | last post by:
it seems every time i pass some text through an applet parameter, say: .... <PARAM name="mytext" value=' This is a test '> ....
5
by: Marian Steinbach | last post by:
Howdy! I am just switching from PHP4 to PHP5. Since there are many different ways to create XML in PHP5, I'd like to know from the community which one would be suited best for a REST web service...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.