orNull
@DeprecatedAsErrorSince(version = KotoolsTypesVersion.V5_1_0)
@ExperimentalSince(version = KotoolsTypesVersion.V4_5_3)
Deprecated (with error)
Use the 'of(String)' function instead.
Replace with
import org.kotools.types.EmailAddress
Content copied to clipboard
EmailAddress of textContent copied to clipboard
Creates an instance of EmailAddress from the specified text, or returns null if the text doesn't match the default regular expression.
This function is not available from Java code due to its non-explicit support for nullable types.
See the orThrow function for throwing an exception instead of returning null in case of invalid text.
@DeprecatedAsErrorSince(version = KotoolsTypesVersion.V5_1_0)
@ExperimentalSince(version = KotoolsTypesVersion.V5_0_1)
Deprecated (with error)
Use the 'of(String, EmailAddressRegex)' function instead.
Replace with
import org.kotools.types.EmailAddress
Content copied to clipboard
EmailAddress.of(text, regex)Content copied to clipboard
Returns an email address from the specified text, or returns null if the text doesn't match the specified regex.
This function is not available from Java code due to its non-explicit support for nullable types.
See the orThrow function for throwing an exception instead of returning null in case of invalid text.