We break down Go’s string model as a sequence of bytes in
UTF-8: how
len, indexing, and
range differ, why
byte is not a “character”, and why
rune is not always “what the user sees”. Then we build practical input normalization at the boundary:
strings.TrimSpace,
strings.Fields,
strings.Join, case handling via
strings.ToLower, and comparisons via
strings.EqualFold. Finally: command parsing, searching (
strings.Contains), building strings with
strings.Builder, and debugging strings by printing with
%q.