0

How can I generate columns with spacing using xtend? Is there a way, without computing by myself the length of the columns? Are there any utility classes for generating columns?

The generated output, that I want to achieve is:

{ AA, -1, XX, FFXXXYY, 0, 0, 0 },
{ BB,  1, FF,       1, 0, 0, "Blup" },
aphex
  • 3,372
  • 2
  • 28
  • 56

1 Answers1

1

There are no Xtend specific utilities, but you may want to use Guava's Strings.padStart to prepend the spaces per column.

Sebastian Zarnekow
  • 6,609
  • 20
  • 23
  • It works great with xtend. I used import static extension com.google.common.base.Strings.* and then object.name.startPad(10,' '). Thanks for your answer! – aphex Jan 19 '15 at 13:18