Dear all,
I would need for making my logs more readable to pad a string left and right symmetrically, is there anything like that pre-built in the Standard library?
Best regards
Edmondo Porcu
i suspect logging = println(...) ;)
This pads only to the right, how can one also make it to left symmetrically?
PS: viktor, it is only for few messages so I am not sure I would like to change the layout for log4j for only a few messages at startup of my app
From: Naftoli Gugenheim [mailto:nafto...@gmail.com]
Sent: jeudi 19 juillet 2012 06:06
To: Edmondo Porcu
Subject: Re: [scala-user] Padding a string left and right in Scala
scala> "hello".padTo(25,"-").mkString
res5: String = hello--------------------
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________