-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
Hi team!
Within the Microsoft Docs there are several locations mentioning case-sensitive and culture-sensitive string comparison. However, I could not find a valid source (within Microsoft Docs or externally) explaining the culture-specific sorting rules. In this page, there is the example of "goodbye" versus "Goodbye" with the result that "goodbye" precedes "Goodbye". This seems to imply that "g" < "G".
Similar in https://docs.microsoft.com/en-gb/dotnet/api/system.string.compare?view=netframework-4.7.1, where small letter "i" is compared to capital letter "I". Here again, it is implied that lower-case letters precede upper-case letters. But I could not find a source explicitly stating the (case-sensitive) sorting rules for the various cultures.
If there is a reference within Microsoft Docs that I missed, then it would be great to emphasize it. If the sorting rules used by the .Net framework are based on an external document, then please add a reference to it to the Microsoft Docs.
Kind regards,
David
Document details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 4b3674aa-027d-7481-cda5-e654ab02171c
- Version Independent ID: 5e97787f-65f8-3f60-1663-ff17f325c1b7
- Content: String.CompareTo Method (System)
- Content Source: xml/System/String.xml
- Product: .net
- GitHub Login: @dotnet-bot
- Microsoft Alias: dotnetcontent