May I also recommend that the function be benchmarked, and potentially
that it be profiled and optimized if needed? A function like this may
be used on hundreds or even thousands of items in a single operation
(e.g. formatting a long list of items into a vtable), so it's important
that it not be too slow. I don't think I've seen mention of performance
yet (forgive me if I missed it).