I have a string that I would like to print . Is it possible to center it when printing ?
+9
A:
Use the ~< formatting directive. This will return "hello there" centered within 70 columns.
(format nil "~70:@<~A~>" "hello there")
Glomek
2008-10-17 19:33:35
Thank you! Can you point me in the direction of other examples of format?
Vhaerun
2008-10-17 19:37:49
Here is the Hyperspec section on `format`:http://www.lispworks.com/documentation/HyperSpec/Body/22_c.htm
Nathan Sanders
2008-10-17 19:39:52
Thanks Nathan! I appreciate it !
Vhaerun
2008-10-17 19:41:11
Seibel also has some examples: http://www.gigamonkeys.com/book/a-few-format-recipes.html
Frank Shearar
2010-06-02 13:22:18