Formatting my String
- by pringlesinn
I need to write currency values like $35.40 (thirty five dollars and forty cents)
and after that, i want to write some "****"
so at the end it will be:
thirty five dollars and forty cents*********
in a maximun of 100 characters
I've asked a question about something very likely but I couldn't understand the main command.
String format = String.format("%%-%ds", 100);
String valorPorExtenso = String.format(format, new Extenso(tituloTO.getValor()).toString());
What do I need to change on format to put *** at the end of my sentence?
The way it is now it puts spaces.