-1 it does not len it does, and s[0 .. i] is the slice of s[] that is that email address References: RFC2822
string s1 = "my.e-mail@www.example-domain.com with garbage added"; assert(emailLength(s1) == 32); string s2 = "no email address here"; assert(emailLength(s2) == -1); assert(emailLength("issue 14924") < 0);
Does string s[] start with an email address?