toString

override fun toString(): String

Returns the string representation of this email address.


Calling from Kotlin

Here's an example of calling this function from Kotlin code:

val address = EmailAddress("contact@kotools.org")
val message = "$address" // or address.toString()
println(message) // contact@kotools.org

Calling from Java

Here's an example of calling this function from Java code:

final EmailAddress address = new EmailAddress("contact@kotools.org");
final String message = address.toString();
System.out.println(message); // contact@kotools.org