If we don't care about the lexicographical ordering result of `string::compare`, I think the code reads better if you just use `operator==` here.