I have a lengthy string and want to break it up into a number of sub-strings so I can display it in a menu as a paragraph rather than a single long line. But I don't want to break it up in the middle of a word (so a break every n characters won't work).
So I want to break the string up by the first occurrence of any of the characters in a String after a certain point (in my case, the characters would be a space and a semi-colon, but they could be anything).
Something like:
String result[] = breakString(baseString, // String
lineLength, // int
breakChars) // String