I want to calculate string length in bytes. Here is the sample code I used.
function mine(string s ) public view returns (bytes) {
return bytes(s).length;
}
But throws this error-
TypeError: Return argument type uint256 is not implicitly convertible to expected type (type of first return variable) bytes memory.
return bytes(s).length;
^-------------^