I have a string that I need to parse into ~X-number of equal length strings...maybe put each part into array elements. The catch....the string is a sentence and I need to make sure I parse on a "word" ending.
For example, if I have the following:
string = "This is my string that I want to split."
and I want to split this into ~15-length strings, so I want to get the following:
s1: "This is my"
s2: "string that I"
s3: "want to split."
Any ideas? Thank you in advance!
For example, if I have the following:
string = "This is my string that I want to split."
and I want to split this into ~15-length strings, so I want to get the following:
s1: "This is my"
s2: "string that I"
s3: "want to split."
Any ideas? Thank you in advance!