Thank you both for your answers.  It is much appreciated.

The UTF8 encoding of that codepoint is three bytes.  So the rune will still
occupy 4 bytes, even if the last byte holds no data? I'm sorry for the
school boy question!

Thank you.

On Thu, 7 Feb 2019, 10:52 Tamás Gulácsi <tgulacs...@gmail.com wrote:

> A rune is an int32, so it takes 4 bytes by definition.
> A string in a struct with position, length and backing array of bytes. The
> backing array here consumes 3 bytes, but tge position and length occupies
> space too, so the string of that rune occupies more than 3 bytes after all.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "golang-nuts" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/golang-nuts/-bvJLkhX_dY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

On Thu, 7 Feb 2019, 10:52 Tamás Gulácsi <tgulacs...@gmail.com wrote:

> A rune is an int32, so it takes 4 bytes by definition.
> A string in a struct with position, length and backing array of bytes. The
> backing array here consumes 3 bytes, but tge position and length occupies
> space too, so the string of that rune occupies more than 3 bytes after all.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "golang-nuts" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/golang-nuts/-bvJLkhX_dY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to