From charlesreid1

(Created page with "Related: Rosalind/Problem 1A =Flags= {{GoFlag}}")
 
No edit summary
Line 1: Line 1:
Related: [[Rosalind/Problem 1A]]
Related: [[Rosalind/Problem 1A]]
The Go blog: strings, bytes, runes, and characters in Go: https://blog.golang.org/strings
A string in Go is a read-only slice of bytes. A string can hold arbitrary bytes, it is not required to hold unicode/UTF-8/other format.
Indexing a string does not access characters - it accesses the individual bytes. So, when you store a character value in a string, you are storing the byte representation at that point in time.





Revision as of 05:01, 12 December 2018

Related: Rosalind/Problem 1A

The Go blog: strings, bytes, runes, and characters in Go: https://blog.golang.org/strings

A string in Go is a read-only slice of bytes. A string can hold arbitrary bytes, it is not required to hold unicode/UTF-8/other format.

Indexing a string does not access characters - it accesses the individual bytes. So, when you store a character value in a string, you are storing the byte representation at that point in time.



Flags