this is my first question!
So here’s my question.
I have a string like this
var sentence string
string = "the biggest ocean is the Pacific ocean"
I want to be able to make the t in the to be capitalized so the string is
"The biggest ocean is the Pacific ocean"
Thanks for any replies!
>Solution :
I have simple solution for you.
Its a fork I have of someones project on Github
https://github.com/CleanMachine1/capitalise
To use it just run in a terminal:
go mod init MODULENAME
go get github.com/cleanmachine1/capitalise
then in your code you can use
package main
import ("github.com/cleanmachine1/capitalise")
func main(){
sentence = capitalise.First(sentence)
}