isEmail

Checks whether a string has an email address format

bool
isEmail
(
string email
)

Parameters

email string

the email address to do check on

Examples

assert(isEmail("hello@example.com"));
assert(!isEmail("nah!"));

Meta