From 1ddffe65d8d200919bcaf4c870397921a9be2835 Mon Sep 17 00:00:00 2001 From: David Eisinger Date: Mon, 17 Jul 2023 23:20:38 -0400 Subject: [PATCH] [go] runes; log.println --- content/notes/golang/index.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/notes/golang/index.md b/content/notes/golang/index.md index 7a76674..73ff367 100644 --- a/content/notes/golang/index.md +++ b/content/notes/golang/index.md @@ -158,6 +158,10 @@ I find [Go][1] really compelling, even though it's not super applicable to my jo * [Time][23] * `time.Duration` -- `time.Second * 1e9` is a duration of one billion seconds * `1e9` is the same as `1.0*math.Pow(10, 9)` +* Runes + * `unicode.IsLetter` -- test if rune is a letter + * `strings.ContainsRune` -- test if string contains letter (`strings.ContainsRune(s[i+1:], c)`) +* `log.Println` -- print out anything (like a data structure) [17]: https://stackoverflow.com/a/40951013 [18]: https://go.dev/doc/effective_go#named-results