//将bytes动态数组---->成string
pragma solidity ^0.4.0;
contract bytesTostring{
bytes name = new bytes(2);
function Init(){
name[0] = 0x63;
name[1] = 0x68;
}
function BytesTostring() view returns(string){
return string(name);
}
}
9.Solidity-将bytes动态数组转化为String类型
于 2022-11-06 17:08:16 首次发布