Strings in Go (Golang): An Introduction

Опубликовано: 14 Март 2026
на канале: Zoran Stankovic
311
11

Today we will talk about Strings in Go. We will see how to declare string variables and what operations we can perform on them. You will learn what lexicographical comparison is. How to use len function in Go. How to use RuneCountInString function from utf8 package. How to access arguments by location with Printf function.


#go #golang #coding #programming #learning #tutorial #dataType #strings

Link to my blog post:

Resources:
Link to GitHub branch repo: https://github.com/zoranstankovic/go-...
utf8.RuneCountInString function: https://pkg.go.dev/unicode/utf8#RuneC...

Chapters:
0:00 Intro
0:25 What are strings?
0:53 How to declare strings?
1:37 Empty string example
2:10 double quotes vs backticks
3:03 String comparison
3:25 Lexicographical comparison
5:36 String equality
6:11 Printf %q vs %s
6:46 Printf access arguments by location
7:58 String concatenation
8:12 Access a single character in the string
8:53 String immutability
9:33 len function
10:59 utf8.RuneCountInString function
12:03 Assignment 1
12:37 Assignment 2
13:09 Summary
14:16 Outro


📣 Please leave a LIKE and SUBSCRIBE for more content! 📣

Follow me on:
🌍Website: https://zoranstankovic.com/
📱Twitter:   / ryunosukezoran  
🔗Github: https://github.com/zoranstankovic