-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.