Skip to content

Commit

Permalink
add go byte rune
Browse files Browse the repository at this point in the history
  • Loading branch information
lcp0578 committed Mar 5, 2020
1 parent d5d3351 commit 764608b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@
- [gofmt vs go fmt](src/Go/gofmt.md)
- [Compiler Directives](src/Go/CompilerDirectives.md)
- [for select](src/Go/for-select.md)
- [byte和rune](src/Go/byte_rune.md)
- [string](src/Go/string.md) 字符串操作相关
- [string number](src/Go/StringToNumber.md) 数字与字符串之间的转换
- [number base conversion](src/Go/NumberBaseConversion.md)进制转换
Expand Down
1 change: 1 addition & 0 deletions src/Go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- [gofmt vs go fmt](gofmt.md)
- [Compiler Directives](CompilerDirectives.md)
- [for select](for-select.md)
- [byte和rune](byte_rune.md)
- [string](string.md) 字符串操作相关
- [string number](StringToNumber.md) 数字与字符串之间的转换
- [vgo](vgo.md) 版本控制
Expand Down
8 changes: 8 additions & 0 deletions src/Go/byte_rune.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## byte和rune
- Go语言中byte和rune实质上就是uint8和int32类型。byte用来强调数据是raw data,而不是数字;而rune用来表示Unicode的code point。

uint8 the set of all unsigned 8-bit integers (0 to 255)
int32 the set of all signed 32-bit integers (-2147483648 to 2147483647)

byte alias for uint8
rune alias for int32

0 comments on commit 764608b

Please sign in to comment.