I like the Swift dump () function like this one
class MyClass { let a = "Hello" let b = "Bye!" init() {} } let myClass = MyClass() dump(myClass)
But dump () does not return a string. It simply prints to the console and returns the first parameter.
public func dump<T>(x: T, name: String? = default, indent: Int = default, maxDepth: Int = default, maxItems: Int = default) -> T
Is there any dump () function that returns a string?
source share