```\nfunction toString(ShortString sstr) internal pure returns (string memory) {\n    uint256 len = byteLength(sstr);\n    // using `new string(len)` would work locally but is not memory safe.\n    string memory str = new string(32);\n    /// @solidity memory-safe-assembly\n    assembly {\n        mstore(str, len)\n        mstore(add(str, 0x20), sstr)\n    }\n    return str;\n}\n```\n