Skip to content

StringToTitleCase: .NET 10, culture-safe all-caps fix and minor-words helper - #2351

Open
vladimir-pecanac-main wants to merge 2 commits into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/68251-csharp-convert-string-title-case
Open

vladimir-pecanac-main wants to merge 2 commits into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/68251-csharp-convert-string-title-case

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Moves both projects from net6.0 to net10.0 and updates the MSTest packages to 4.5.2. Program.cs now uses top-level statements, drops an unused variable and lowercases all-caps input with the same TextInfo instead of string.ToLower(), which reads the machine culture. Adds a TitleCaseExtensions helper that keeps small words like "of" and "the" lowercase, references the console project from the tests, pins the tests to en-US so they pass on any machine, fixes a misspelled test name and adds tests for acronyms, Turkish casing, the minor-words helper and inputs with digits or inner capitals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant