From 43931a8e771836806111b8f0f0b3a047e146e8a7 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sat, 16 Apr 2022 13:02:56 +0300 Subject: [PATCH] doc: byte => u8 --- doc/docs.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/docs.md b/doc/docs.md index 225f84eed7..1fd7794ac4 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -434,7 +434,7 @@ bool string i8 i16 int i64 i128 (soon) -byte u16 u32 u64 u128 (soon) +u8 u16 u32 u64 u128 (soon) rune // represents a Unicode code point @@ -460,7 +460,7 @@ These are the allowed possibilities: ↘ ↘ f32 → f64 ↗ ↗ - byte → u16 → u32 → u64 ⬎ + u8 → u16 → u32 → u64 ⬎ ↘ ↘ ↘ ptr i8 → i16 → int → i64 ⬏ ``` @@ -518,7 +518,7 @@ In V, a string is a read-only array of bytes. All Unicode characters are encoded s := 'hello 🌎' // emoji takes 4 bytes assert s.len == 10 -arr := s.bytes() // convert `string` to `[]byte` +arr := s.bytes() // convert `string` to `[]u8` assert arr.len == 10 s2 := arr.bytestr() // convert `[]byte` to `string`