StringBuilder remaining = new StringBuilder(splittedFirst[1] == null ? "" : splittedFirst[1] + "\n");
breakSplitted.stream().skip(1).forEach(s -> remaining.append(s + "\n"));
remaining.deleteCharAt(remaining.length() - 1);
return new String[]{splittedFirst[0], remaining.toString()};
}
<BUG>if (getTextWidth(font, fontSize, shortenedText) <= allowedWidth && shortenedText.indexOf((char) 13) == -1) {
return new String[]{shortenedText, null};
}</BUG>
boolean cleanSplit = true;
<BUG>List<Integer> indexes = getWrapableIndexes(shortenedText);
int start = 0;</BUG>
int j = indexes.size() - 1;

StringBuilder remaining = new StringBuilder(splittedFirst[1] == null ? "" : splittedFirst[1] + "\n");
breakSplitted.stream().skip(1).forEach(s -> remaining.append(s + "\n"));
remaining.deleteCharAt(remaining.length() - 1);
return new String[]{splittedFirst[0], remaining.toString()};
}
if (getTextWidth(font, fontSize, text) <= allowedWidth && text.indexOf((char) 13) == -1) {
return new String[]{text, null};
}
boolean cleanSplit = true;
List<Integer> indexes = getWrapableIndexes(text);
int start = 0;
int j = indexes.size() - 1;
