Skip to content

Commit

Permalink
Update 04.5.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hantmac committed Jan 20, 2019
1 parent b5ff6f4 commit 03c5b62
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions eBook/chapter4/04.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,20 +91,35 @@ Go字符串实际上是一个字节切片,可以存储任意类型、任意长
> go run strings.go
>
> �B2UP5#P)�
> x: 9942325550352350299c
> sLiteral length: 10
> 99 42 32 55 50 35 23 50 29 9c
> q: "\x99B2UP5#P)\x9c"
> +q: "\x99B2UP5#P)\x9c"
> x: 99 42 32 55 50 35 23 50 29 9c
> s: As a string: �B2UP5#P)�
> U+20AC '€' starts at byte position 0
> U+00A3 '£' starts at byte position 3
> U+00B3 '³' starts at byte position 5
> s2 length: 7
> s3: ab12AB
> x: 61 62 31 32 41 42
> s3 length: 6
> 61 62 31 32 41 42
在不清楚Unicode和UTF-8机制的情况下,你可能会对本节的输出干到困惑,不必恐慌,因为这些在平时的开发中很少使用,基本的`fmt.Printf()``fmt.Println()`就能满足你的需求。
Expand Down

0 comments on commit 03c5b62

Please sign in to comment.