From fefe9bdee76d5acff8b14da8c5b60f16b7f7a83c Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 4 Aug 2016 17:11:03 +0100 Subject: Fix String Literals documentation about implicit conversions --- docs/types.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/types.rst b/docs/types.rst index 35f0e247..6e01fce2 100644 --- a/docs/types.rst +++ b/docs/types.rst @@ -214,7 +214,7 @@ a non-rational number). String Literals --------------- -String Literals are written with double quotes (``"abc"``). As with integer literals, their type can vary, but they are implicitly convertible to ``bytes`` if they fit, to ``bytes`` and to ``string``. +String Literals are written with double quotes (``"abc"``). As with integer literals, their type can vary, but they are implicitly convertible to ``bytes1``, ..., ``bytes32`` if they fit, to ``bytes`` and to ``string``. .. index:: enum -- cgit From b881dbb29200558d93c642ef41950d9d43a7e679 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 4 Aug 2016 17:35:00 +0100 Subject: Document \n, \xNN and \uNNNN --- docs/types.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs') diff --git a/docs/types.rst b/docs/types.rst index 6e01fce2..0c5aaf1b 100644 --- a/docs/types.rst +++ b/docs/types.rst @@ -216,6 +216,8 @@ String Literals String Literals are written with double quotes (``"abc"``). As with integer literals, their type can vary, but they are implicitly convertible to ``bytes1``, ..., ``bytes32`` if they fit, to ``bytes`` and to ``string``. +String Literals support escape characters, such as ``\n``, ``\xNN`` and ``\uNNNN``. ``\xNN`` takes a hex value and inserts the appropriate byte, while ``\uNNNN`` takes a Unicode codepoint and inserts an UTF8 sequence. + .. index:: enum .. _enums: -- cgit