Table of Contents
Email!
values allow for directly expressing email addresses, e.g. foo@bar.net
Email!
is a member of the following typesets: any-string!
, series!
Email values can be created using literal syntax, or at runtime using a make
constructor or a to
conversion.
One or more characters, followed by the @
symbol, followed by zero or more additional characters.
Examples
foo@bar.net
gregg@red-lang.org
g@
Invalid characters
%
(
)
:
"
-
Make
>> f: make email! "foo" == foo >> type? f == email!
-
To
>> b: to email! 'bar == bar >> type? b == email!
Path accessors provide a convenient way for getting or setting the user name or host name of an email value.
>> e: me@me.net
== me@me.net
>> e/user
== "me"
>> e/user: "you"
== "you"
>> e
== you@me.net
All comparators can be applied on email!
: =, ==, <>, >, <, >=, <=, =?
. In addition, min
, and max
are also supported.
Use email?
to check if a value is of the email!
datatype.
>> email? foo@bar.net
== true
Use type?
to return the datatype of a given value.
>> type? foo@bar.net
== email!