pointfreeco / swift-custom-dump

A collection of tools for debugging, diffing, and testing your application's data structures.
MIT License
800 stars 89 forks source link

Add `String.init(customDumping:)` #79

Closed stephencelis closed 1 year ago

stephencelis commented 1 year ago

It can be useful to get a custom dump representation of a value as a string on a single line. Swift provides String.init(describing:) and String.init(reflecting:) (though no equivalent for a quick string from Swift.dump), so maybe we can provide similar functionality via a string initializer.