I am trying to develop a script that will take information from a form text box and format it so that each line is a certain length (45 characters long).
This information will then be printed to a text file, where it needs to retain it's formating, as the text file is used to automate a process in one of the systems we use. (A VBScript based system)
The formating needs to be able to take into account that the 45th character in each line may or may not be a space and needs be able to read back from the 45th character to the last space in that line as this system does not allow line wrapping.
Example:
I enter this into the form:
This is just a demo where I need to break text into specific lengths of lines, with no line wrapping.
Formatted it should look like this:
This is just a demo where I need to
break text into specific lengths of
lines, with no line wrapping.
Any suggestions or ideas on how to achieve this?
Thanks
Rob