List of usage examples for org.apache.commons.text WordUtils wrap
public static String wrap(final String str, final int wrapLength, final String newLineStr, final boolean wrapLongWords)
Wraps a single line of text, identifying words by ' '
.
Leading spaces on a new line are stripped.
From source file:io.github.seiferma.jameica.hibiscus.dkb.creditcard.synchronize.DKBScraperSynchronizeJobKontoauszugImpl.java
private Umsatz createTransaction(DKBTransaction transaction, Konto k) throws RemoteException { Umsatz hbciTransaction = Settings.getDBService().createObject(Umsatz.class, null); hbciTransaction.setKonto(k);//from ww w . j ava2 s. com hbciTransaction.setDatum(transaction.getBookingDate()); hbciTransaction.setValuta(transaction.getValueDate()); hbciTransaction.setBetrag(transaction.getAmountInCents() / 100.0); hbciTransaction.setWeitereVerwendungszwecke( WordUtils.wrap(transaction.getDescription(), 35, "\n", true).split("\n")); if (!transaction.isBooked()) { int flags = hbciTransaction.getFlags() | Umsatz.FLAG_NOTBOOKED; hbciTransaction.setFlags(flags); } return hbciTransaction; }