fusesource / jansi

Jansi is a small java library that allows you to use ANSI escape sequences to format your console output which works even on windows.
http://fusesource.github.io/jansi/
Apache License 2.0
1.11k stars 140 forks source link

Ansi should implement java.lang.Appendable #168

Closed buko closed 3 years ago

buko commented 4 years ago

Methods like DateTimeFormatter#formatTo take a java.lang.Appendable. Normally this is just a StringBuilder. The Ansi class has an underlying StringBuilder but provides no accessor for its underlying StringBuilder -- which is fine, in this case StringBuilder is just an implementation detail -- but this makes the Ansi class unergonomic when using code that expects an Appendable. I think Ansi should implement Appendable and therefore it should be possible to pass to methods like formatTo that expect an Appendable.