solidity/test/libsolidity/semanticTests/strings/unicode_string.sol

16 lines
456 B
Solidity
Raw Normal View History

contract C {
function f() public pure returns (string memory) {
2020-07-13 20:11:42 +00:00
return unicode"😃, 😭, and 😈";
}
function g() public pure returns (string memory) {
return unicode"😃, 😭,\
and 😈";
}
}
2020-07-20 13:06:45 +00:00
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f() -> 0x20, 0x14, "\xf0\x9f\x98\x83, \xf0\x9f\x98\xad, and \xf0\x9f\x98\x88"
2020-07-13 20:11:42 +00:00
// g() -> 0x20, 0x14, "\xf0\x9f\x98\x83, \xf0\x9f\x98\xad, and \xf0\x9f\x98\x88"