For example when calling (tostring some-enum)
you get something like "\x1b[33mField\x1b[0m"
. I would say tostring
should be reserved to returning plaintext strings that can be used for other purposes that are not display, or even to allow conditional restyling, both of which are difficult to do without using an ANSI code stripping routine.