Or use a function like this:
Java API
https://commons.apache.org/proper/c...elease/org/apache/commons/text/WordUtils.html
Java function (not tested)
protected string BreakWord(string InString, int MaxWordLength)
{
//split by spaces into an array
var strArr = InString.Split(new char[] { ' ' });
//loop through all words, if a word is longer than our max chars insert a space
strArr = strArr.Select(x => x.Length > MaxWordLength ? x.Insert(MaxWordLength, "") : x).ToArray();
//return our string array joined back by its spaces
return string.Join(" ", strArr);
}
Java API
https://commons.apache.org/proper/c...elease/org/apache/commons/text/WordUtils.html
Java function (not tested)
Last edited:




WTF oii

