Here, We are going to learn about strings package in go golang. strings package implements simple functions to manipulate UTF-8 encoded strings.
How to import strings package in go golang:
import strings
Methods in strings package:
- Split()
- Count()
- EqualFold()
- ContainsRune()
- ContainsAny()
- Contains()
- Compare()
- HasPrefix()
- HasSuffix()
- Index()
- Map()
- LastIndexFunc()
- LastIndexByte()
- LastIndexAny()
- LastIndex()
- Join()
- ToLower()
- Title()
- SplitN()
- SplitAfter()
- Split()
- ReplaceAll()
- Replace()
- Repeat()
- ToLowerSpecial()
To learn more about golang, Please refer given below link.
https://techieindoor.com/go-lang-tutorial/
References:
https://golang.org/doc/
https://golang.org/pkg/
https://golang.org/pkg/strings/