contextual

simple and typesafe interpolated strings, checked at compile-time

Package Information

SBT

"com.propensive" %% "contextual-examples" % "1.0.0"

License

Apache 2.0

Source code

Defined contexts

None

Predefined substitution types

None

Email addresses (email"")

Features

  • Does a simple regular-expression test on the validity of the email
  • Does not support substitutions

Examples

> import contextual.examples.email._
> email"""info@scala.world"""
res: Email = Email(info@scala.world)
> import contextual.examples.email._
> email"""john.smith@hotmail.com"""
res: Email = Email(john.smith@hotmail.com)
> import contextual.examples.email._
> email"""hdr22@clintonemail.com"""
res: Email = Email(hdr22@clintonemail.com)

References