Hello, I am having a tough time wrapping my head around some code i need to write.
Given a string of many lines, \r seperated, I need to do some specific truncating of the lines.
if the 72nd character is a space, replace that with a \r, if it is not a space, step backwards in the string untill you hit a space and replace with a \r.
Basically, I have a raw email body, and it is not wrapped in any way, I need it to be wrapped at 72 characters.
If there are perl libs, functions, and other tools used to deal with this, I wont be able to use them, I need to do this with plain normal php functions.
thanks
fixed 72 character width formatting
Moderator: General Moderators
-
pootergeist
- Forum Contributor
- Posts: 273
- Joined: Thu Feb 27, 2003 7:22 am
- Location: UK