我做错了什么?为什么 ToUpper 不起作用?
package main
import (
"fmt"
"regexp"
"strings"
)
func main() {
r := regexp.MustCompile("(\\w)(\\w+)")
// Getting "sometext" instead of "SomeText"
res := r.ReplaceAllString("some text", strings.ToUpper("$1") + "$2")
fmt.Println(res)
}