From 764608b2c44ddeacd73f95ec2b982f66461d3805 Mon Sep 17 00:00:00 2001 From: lcp0578 Date: Fri, 6 Mar 2020 00:07:32 +0800 Subject: [PATCH] add go byte rune --- README.md | 1 + src/Go/README.md | 1 + src/Go/byte_rune.md | 8 ++++++++ 3 files changed, 10 insertions(+) create mode 100644 src/Go/byte_rune.md diff --git a/README.md b/README.md index ba777ed3..b9f25657 100644 --- a/README.md +++ b/README.md @@ -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)进制转换 diff --git a/src/Go/README.md b/src/Go/README.md index 7fdcfe46..0c618ab7 100644 --- a/src/Go/README.md +++ b/src/Go/README.md @@ -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) 版本控制 diff --git a/src/Go/byte_rune.md b/src/Go/byte_rune.md new file mode 100644 index 00000000..abfc430c --- /dev/null +++ b/src/Go/byte_rune.md @@ -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 \ No newline at end of file