private void appendSpace(CharSequence space) {
			if (len > width) {
				appendLinesep();
				len += space.length() - 1;
				result.append(space.subSequence(1, space.length()));
			}
			else {
				len += space.length();
				result.append(space);
			}
		}
About the worst way to wrap lines ever
Ghidra/Framework/Generic/src/main/java/ghidra/util/StringUtilities.java