Skip to content

929. Unique Email Addresses#14

Open
hemispherium wants to merge 1 commit intomainfrom
0929-unique-email-addresses
Open

929. Unique Email Addresses#14
hemispherium wants to merge 1 commit intomainfrom
0929-unique-email-addresses

Conversation

@hemispherium
Copy link
Owner

@hemispherium hemispherium self-assigned this Dec 26, 2025
string local_name = address.substr(0, address.find('@'));
string domain_name = address.substr(address.find('@') + 1);
local_name.erase(std::remove(local_name.begin(), local_name.end(), '.'), local_name.end());
local_name = local_name.substr(0, local_name.find('+'));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

この行、substr で string を構築して、local_name = で元の文字列を破壊してコピーしているはずです。
local_name.erase くらいで済みそうですね。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants