New answers tagged


You can check the length of the bytes of the value. You do this by converting the string to bytes and checking the length. If it is greater than 0, than it exists. Your new code would be as follows: if(bytes(professorsExamHash).length == 0){ return "No exam hash asociated with this professor address"; }

Top 50 recent answers are included