I need to break a long text string into smaller pieces approximately once every 500 characters (not a special character), forming an array of all the sentences and then put them together separated by a specific character (eg / /). Something as follows:
"This text is a very very large text."
So, I get:
arrTxt(0) = "This is"
arrTxt(1) = "a very"
arrTxt(2) = "very large text"
...
And finally:
response.write arrTxt(0) & "//" & arrTxt(1) & "//" & arrTxt(2)...
Due to my limited knowledge of classic asp, the closest I came to a desired result was the following:
length = 200
strText = "This text is a very very large."
lines = ((Len (input) / length) - 1)
For i = 0 To (Len (lines) - 1)
txt = Left (input, (i * length)) & "/ /"
response.write txt
Next
However, this returns a repeated and overlapping text string: "this is / / this is a / / this is a text //...
Any idea with vbscript? Thank you!