Closed svetlyak40wt closed 4 years ago
It might be useful, for example, if you want to render float numbers with a limited number of digits after the point.
This can be done like that:
CL-USER> (let ((ascii-table:*default-value-formatter* (lambda (value) (format nil (typecase value (double-float "~,2F") (t "~A")) value)))) (let ((ascii (ascii-table:make-table '("Name" "Value")))) (ascii-table:add-row ascii (list "Pi" pi)) (ascii-table:display ascii t))) +------+-------+ | Name | Value | +------+-------+ | Pi | 3.14 | +------+-------+
Looks good to me. Thanks.
It might be useful, for example, if you want to render float numbers with a limited number of digits after the point.
This can be done like that: