solidity/test/libsolidity/syntaxTests/string/unicode_escape_literals.sol
2020-07-27 18:21:17 +01:00

23 lines
541 B
Solidity

contract test {
function oneByteUTF8() public pure returns (bytes32) {
bytes32 usdollar = "aaa\u0024aaa";
return usdollar;
}
function twoBytesUTF8() public pure returns (bytes32) {
bytes32 cent = "aaa\u00A2aaa";
return cent;
}
function threeBytesUTF8() public pure returns (bytes32) {
bytes32 eur = "aaa\u20ACaaa";
return eur;
}
function combined() public pure returns (bytes32) {
bytes32 res = "\u0024\u00A2\u20AC";
return res;
}
}
// ----