Andrew's Digital Garden

Strings in Go

Strings are zero-indexed

Strings in go are immutable, this means another variable that references a string will not change if the original string does. There is a mutable version of strings that can be used, which is a slice of bytes []byte.

String literals are encapsulated in double quotes, raw string literals can be created using backticks, which preserve all whitespace, etc.

Can be accessed with list operations [[20200720102455-go-list-operations]]

[[go]]

Strings in Go