What version of Go are you using (go version)?
The current documentation on https://golang.org/pkg/strings/
Does this issue reproduce with the latest release?
Yes, using the examples inside the strings package documentation
What operating system and processor architecture are you using (go env)?
None providable
What did you do?
Copied strings.ToTitle example to strings.ToUpper and changed ToTitle() to ToUpper():
package main
import (
"fmt"
"strings"
)
func main() {
fmt.Println(strings.ToUpper("her royal highness"))
fmt.Println(strings.ToUpper("loud noises"))
fmt.Println(strings.ToUpper("хлеб"))
}
What did you expect to see?
A difference in output.
What did you see instead?
Example ToTitle (unmodified) outputs:
HER ROYAL HIGHNESS
LOUD NOISES
ХЛЕБ
Example ToUpper (modified as described above) outputs:
HER ROYAL HIGHNESS
LOUD NOISES
ХЛЕБ
No difference. So for me it is unclear which function is now the correct one to use for an imaginary case.
What version of Go are you using (
go version)?The current documentation on https://golang.org/pkg/strings/
Does this issue reproduce with the latest release?
Yes, using the examples inside the strings package documentation
What operating system and processor architecture are you using (
go env)?None providable
What did you do?
Copied
strings.ToTitleexample tostrings.ToUpperand changedToTitle()toToUpper():What did you expect to see?
A difference in output.
What did you see instead?
Example ToTitle (unmodified) outputs:
Example ToUpper (modified as described above) outputs:
No difference. So for me it is unclear which function is now the correct one to use for an imaginary case.