Compare Strings In Solidity
Best way to compare strings in solidity.
function compareLengthAndHash(string a, string b) internal returns (bool) {
if(bytes(a).length != bytes(b).length) {
return false;
} else {
return keccak256(a) == keccak256(b);
}
}