pragma solidity ^0.8.0;
contract test{
// string [] public T = [“1f”]; //可变
// / string [1] public T = [“1f”]; 长度固定
string [] public T;
function T_Length() view public returns (uint) {
return T.length;
}
function pushStrToT(string memory _str) public {
T.push(_str);
}
function TS() public view returns(string[] memory){
return T;
}
}