I tried to break a line in Kotlin in order to achieve the correct alignment on the console output. Something like that:
accountsLoopQuery - "$.contactPoints.contactPoints[?(@.contactAccount.id)]"
brokerPassword - *****
brokerURI - tcp://localhost:61616
brokerUsername - admin
contactPointPriorityProperties - "contactPointPriority.properties"
customerCollection - "customer"
customerHistoryCollection - "customer_history"
defaultSystemOwner - "TUIGROUP"
I ended up encoding it like this: tricking Java String.format:
mutableList.forEach { cp ->
println(String.format("%-45s - %s", cp.name, cp.value))
}
Is there any way to do this with the Kotlin libraries?
source
share