1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-16 03:34:53 +02:00

Corrected comment: utf-8 → unicode

Runes hold the raw unicode code point, not utf-8. Storing utf-8 inside of a uint32 would be highly inefficient. Runes are essentially utf-32.
This commit is contained in:
Harry Jeffery
2013-09-04 13:39:02 +01:00
parent 412b312c45
commit 078f6bbc9d

View File

@@ -71,7 +71,7 @@ func learnTypes() {
can include line breaks.` // same string type
// non-ASCII literal. Go source is UTF-8.
g := 'Σ' // rune type, an alias for uint32, holds a UTF-8 code point
g := 'Σ' // rune type, an alias for uint32, holds a unicode code point
f := 3.14195 // float64, an IEEE-754 64-bit floating point number
c := 3 + 4i // complex128, represented internally with two float64s