Function Domain.fromString

Construct an instance of a Domain from user input

static inout(Domain) fromString (
  scope inout(char)[] v
) @safe;

Unlike fromSafeString, this method will always allocate. Validation is done on v, and an Exception is thrown if it fails. As the string can be user input, the terminating dot can be omitted (e.g. 'google.com' is treated as 'google.com.').

Parameters

NameDescription
v A non-empty string representing a domain