Lets say I have a simple data class like ` data cl...
# announcements
r
Lets say I have a simple data class like
data class Foo(val f: String, val password: String)
, and I want to override the toString function to mask the password. Is there a way to do the equivalent of
override fun toString() = this.copy(password = "<NOT SHOWN>").toString()
(which of course doesn't work because the
toString
method just calls itself).