MCPcopy Create free account
hub / github.com/MailCore/mailcore2 / normalizedHostnameWithEmail

Method normalizedHostnameWithEmail

src/core/provider/MCNetService.cpp:102–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102String * NetService::normalizedHostnameWithEmail(String * email)
103{
104 Array *components = email->componentsSeparatedByString(MCSTR("@"));
105 String *hostname = (String *) mHostname->copy()->autorelease();
106 if (components->count() != 0) {
107 hostname->replaceOccurrencesOfString(MCSTR("{domain}"), (String *) components->lastObject());
108 return hostname;
109 }
110 return mHostname;
111}
112
113HashMap * NetService::info()
114{

Callers

nothing calls this directly

Calls 6

lastObjectMethod · 0.80
autoreleaseMethod · 0.45
copyMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected