Grokking Go
0% completed
Introduction to String
A string in Go is a sequence of characters stored as a read-only slice of bytes. Strings are immutable, meaning once a string is created, its contents cannot be changed.
Go strings are UTF-8 encoded, allowing them to store both ASCII and Unicode characters. This makes Go suitable for handling international text and special symbols.
In this lesson, we will explore how to create strings, access individual characters, and understand string indexing.
Creating a String in Go
In Go, we can create strings in two different ways:
1
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%