Skip to main content
3 of 3
had to change param location after change view to public
sola24
  • 1.2k
  • 4
  • 21

how about a different approach to the test, and what's returned, which might be easier.

check for length and return true/false

here I'm just passing in a string or "" as a logic tester

function isDefault(string memory _str) public pure returns (bool) {
    if(bytes(_str).length == 0) return true;
    return false;
}
sola24
  • 1.2k
  • 4
  • 21