我有个function让用户提交string,并控制string长度,比如控制在100个字符之内。请问该怎么实现呢?用.length的方法会出现Member "length" not found or not visible after argument-dependent lookup in string memory.报错
Member "length" not found or not visible after argument-dependent lookup in string memory.
encode(string)再限制长度