Last active
June 10, 2022 13:56
-
-
Save phunguyen19/0031670f26145d34e76f0f93dd0f43b0 to your computer and use it in GitHub Desktop.
solidity compare strings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Compare 2 strings in solidity ^0.4.23; | |
| function compareStrings(string a, string b) internal pure returns (bool){ | |
| return keccak256(a) == keccak256(b); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment