fromStringOrNull

@DeprecatedAsErrorSince(version = KotoolsTypesVersion.V4_5_3)
fun fromStringOrNull(text: Any): EmailAddress?

Deprecated (with error)

Use the 'orNull' method instead.

Replace with

import org.kotools.types.EmailAddress
EmailAddress.orNull("$text")

Creates an instance of EmailAddress from the string representation of the specified text, or returns null if the string representation of text doesn't match the default pattern.

This method is not available from Java code due to its non-explicit support for nullable types.

See the fromString method for throwing an exception instead of returning null in case of invalid text.


@DeprecatedAsErrorSince(version = KotoolsTypesVersion.V4_5_3)
fun fromStringOrNull(text: Any, pattern: Any): EmailAddress?

Deprecated (with error)

Use the 'orNull' method instead.

Replace with

import org.kotools.types.EmailAddress
EmailAddress.orNull("$text", "$pattern")

Creates an instance of EmailAddress from the string representation of the specified text. Returns null if the string representation of text doesn't match the string representation of the specified pattern, or if the string representation of pattern doesn't match the default pattern.

This method is not available from Java code due to its non-explicit support for nullable types.

See the fromString method for throwing an exception instead of returning null in case of invalid text or pattern.