D
Daren
Hi,
I need to be able to split large string variables into an array of
lines, each line can be no longer than 70 chars.
The string variables are text, so I would additionally like the lines
to end at the end of a word, if you catch my drift.
For example, I have a large string variable containing the text:
"I've seen things you people wouldn't believe. Attack ships on fire
off the Shoulder of Orion. I watched C-beams glistening in the
moonlight at the Tannhauser Gate. All these moments will be lost, like
tears in rain. Time to die."
Now, with a limit of 70 chars per line (and lines *must* end with a
completed word), I want this to appear like this:
"I've seen things you people wouldn't believe. Attack ships on fire"
"off the Shoulder of Orion. I watched C-beams glistening in the"
"moonlight at the Tannhauser Gate. All these moments will be lost,"
"like tears in rain. Time to die."
ie, split into an array of x lines.
Thanks,
Daren
I need to be able to split large string variables into an array of
lines, each line can be no longer than 70 chars.
The string variables are text, so I would additionally like the lines
to end at the end of a word, if you catch my drift.
For example, I have a large string variable containing the text:
"I've seen things you people wouldn't believe. Attack ships on fire
off the Shoulder of Orion. I watched C-beams glistening in the
moonlight at the Tannhauser Gate. All these moments will be lost, like
tears in rain. Time to die."
Now, with a limit of 70 chars per line (and lines *must* end with a
completed word), I want this to appear like this:
"I've seen things you people wouldn't believe. Attack ships on fire"
"off the Shoulder of Orion. I watched C-beams glistening in the"
"moonlight at the Tannhauser Gate. All these moments will be lost,"
"like tears in rain. Time to die."
ie, split into an array of x lines.
Thanks,
Daren