diff options
author | Denton Liu <liu.denton+github@gmail.com> | 2016-08-10 23:27:09 +0800 |
---|---|---|
committer | Denton Liu <liu.denton+github@gmail.com> | 2016-08-11 23:10:47 +0800 |
commit | 581114da3eb2be63327b933752ac37820c84601a (patch) | |
tree | d978f1c822bd8a6e2c6abeae6cd0445a9077cbfa | |
parent | 7c15fa661afd52f9e651e57aced5e75d744b9f62 (diff) | |
download | dexon-solidity-581114da3eb2be63327b933752ac37820c84601a.tar.gz dexon-solidity-581114da3eb2be63327b933752ac37820c84601a.tar.zst dexon-solidity-581114da3eb2be63327b933752ac37820c84601a.zip |
Correct UTF-8 spellings
-rw-r--r-- | docs/types.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/types.rst b/docs/types.rst index 0c5aaf1b..0f5757a5 100644 --- a/docs/types.rst +++ b/docs/types.rst @@ -150,7 +150,7 @@ Dynamically-sized byte array Dynamically-sized UTF8-encoded string, see :ref:`arrays`. Not a value-type! As a rule of thumb, use ``bytes`` for arbitrary-length raw byte data and ``string`` -for arbitrary-length string (utf-8) data. If you can limit the length to a certain +for arbitrary-length string (UTF-8) data. If you can limit the length to a certain number of bytes, always use one of ``bytes1`` to ``bytes32`` because they are much cheaper. .. index:: ! ufixed, ! fixed, ! fixed point number @@ -216,7 +216,7 @@ 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. +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 UTF-8 sequence. .. index:: enum @@ -353,7 +353,7 @@ So ``bytes`` should always be preferred over ``byte[]`` because it is cheaper. .. note:: If you want to access the byte-representation of a string ``s``, use ``bytes(s).length`` / ``bytes(s)[7] = 'x';``. Keep in mind - that you are accessing the low-level bytes of the utf-8 representation, + that you are accessing the low-level bytes of the UTF-8 representation, and not the individual characters! .. index:: ! array;allocating, new |