-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Add
EmailAddress.Companion.orNull(String)
function (#635)
- Loading branch information
Showing
7 changed files
with
114 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,4 +42,9 @@ void fromStringOrNull_Any_Any() { | |
EmailAddress.fromStringOrNull(value, pattern); // TABS: 1 | ||
System.out.println(address != null); // true | ||
} // END | ||
|
||
void orNull_String() { | ||
final EmailAddress address = EmailAddress.orNull("[email protected]"); | ||
System.out.println(address != null); // true | ||
} // END | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,4 +43,10 @@ internal object EmailAddressCompanionKotlinSample { | |
EmailAddress.fromStringOrNull(value, pattern) // TABS: 1 | ||
println(address != null) // true | ||
} // END | ||
|
||
@Suppress("FunctionName") | ||
fun orNull_String() { | ||
val address: EmailAddress? = EmailAddress.orNull("[email protected]") | ||
println(address != null) // true | ||
} // END | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters