Why is rune in golang an alias for int32 and not uint32?

前端 未结 5 2100
我寻月下人不归
我寻月下人不归 2021-01-31 15:10

The type rune in Go is defined as

an alias for int32 and is equivalent to int32 in all ways. It is used, by conv

5条回答
  •  时光取名叫无心
    2021-01-31 15:39

    It doesn’t become negative. There are currently 1,114,112 codepoints in Unicode, which is far from 2,147,483,647 (0x7fffffff) – even considering all the reserved blocks.

提交回复
热议问题