1
0
mirror of https://github.com/golang/go synced 2024-11-22 00:34:40 -07:00

spec: correct typo in string conversion examples.

R=golang-dev, dave, r
CC=golang-dev, remy
https://golang.org/cl/6378046
This commit is contained in:
Rémy Oudompheng 2012-07-11 20:26:51 +02:00
parent 93ea79ee7e
commit 2b4cc6ccb5

View File

@ -1,6 +1,6 @@
<!--{ <!--{
"Title": "The Go Programming Language Specification", "Title": "The Go Programming Language Specification",
"Subtitle": "Version of June 27, 2012", "Subtitle": "Version of July 11, 2012",
"Path": "/ref/spec" "Path": "/ref/spec"
}--> }-->
@ -3516,7 +3516,7 @@ the range of valid Unicode code points are converted to <code>"\uFFFD"</code>.
<pre> <pre>
string('a') // "a" string('a') // "a"
string(-1) // "\ufffd" == "\xef\xbf\xbd " string(-1) // "\ufffd" == "\xef\xbf\xbd"
string(0xf8) // "\u00f8" == "ø" == "\xc3\xb8" string(0xf8) // "\u00f8" == "ø" == "\xc3\xb8"
type MyString string type MyString string
MyString(0x65e5) // "\u65e5" == "日" == "\xe6\x97\xa5" MyString(0x65e5) // "\u65e5" == "日" == "\xe6\x97\xa5"