Go strings: UTF-8 helpers such as Contains, Split, and Join
Answer: Package strings implements simple functions to manipulate UTF-8 encoded strings. Contains reports whether substr is within s. Join concatenates elems with a sep string. Split slices a string around a separator.
Examples
package main
import "strings"
func main() {
_ = strings.Contains("hello", "ell")
parts := strings.Split("a,b,c", ",")
_ = strings.Join(parts, ":")
}
Notes
Join writes the first element, then each separator and remaining element, into a Builder.
Reference list
Containsreports whether a substring is within a string.Joinconcatenates elements with a separator.
See also
Claims
- id: C1 claim: The strings package manipulates UTF-8 encoded strings. source: S1 evidence: "Package strings implements simple functions to manipulate UTF-8 encoded strings"
- id: C2 claim: Contains reports whether a substring is within a string. source: S2 evidence: "Contains reports whether substr is within s"
- id: C3 claim: Join concatenates elements with a separator. source: S2 evidence: "func Join(elems []string, sep string) string"
Sources
- [S1] strings package. Go docs. https://pkg.go.dev/strings . License: BSD-3-Clause. Accessed 2026-11-18.
- [S2] strings.go. Go source. https://raw.githubusercontent.com/golang/go/master/src/strings/strings.go . License: BSD-3-Clause. Accessed 2026-11-18.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Go docs, strings package; Go source, strings.go. BSD-3-Clause (https://go.dev/LICENSE). Copyright The Go Authors. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Go docs, strings package; Go source, strings.go. BSD-3-Clause (https://go.dev/LICENSE). Copyright The Go Authors.
Cite this
iinventedlight. 2026. "Go strings: UTF-8 helpers such as Contains, Split, and Join." iinventedlight Library, iil:note:3cgfr8ft, version of 2026-11-18. https://iinventedlight.com/library/notes/go-strings/. License: CC-BY-4.0.
@misc{iil_note_3cgfr8ft,
author = {{iinventedlight}},
title = {{Go strings: UTF-8 helpers such as Contains, Split, and Join}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-18},
url = {https://iinventedlight.com/library/notes/go-strings/},
note = {Permanent ID iil:note:3cgfr8ft. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/go-strings.md.