package main
import (
"fmt"
"strings"
)
func convertPartToUppercase(str string, start, end int) string {
before := str[:start]
upperPart := strings.ToUpper(str[start:end])
after := str[end:]
return before + upperPart + after
}
func main() {
s := "golang programming"
s = convertPartToUppercase(s, 3, 6)
fmt.Println(s)
s = convertPartToUppercase(s, 13, 14)
fmt.Println(s)
}
/*
run:
golANG programming
golANG prograMming
*/