Email! datatype

1. Abstract

Email! values allow for directly expressing email addresses, e.g. foo@bar.net

Email! is a member of the following typesets: any-string!, series!

2. Creation

Email values can be created using literal syntax, or at runtime using a make constructor or a to conversion.

3. Literal syntax

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

% ( ) : "

4. Runtime creation

  • Make

    >> f: make email! "foo"
    == foo
    
    >> type? f
    == email!
  • To

    >> b: to email! 'bar
    == bar
    
    >> type? b
    == email!

5. Comparisons

All comparators can be applied on email!: =, ==, <>, >, <, >=, <=, =?. In addition, min, and max are also supported.

6. Testing values

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!

7. Predefined words

7.1. Functions

email?, suffix?, to-email

results matching ""

    No results matching ""