Fix ToTitleCase Functionality for Dutch Cultures (dotnet/coreclr#10195)
authorRion Williams <rionmonster@gmail.com>
Thu, 16 Mar 2017 00:38:04 +0000 (19:38 -0500)
committerTarek Mahmoud Sayed <tarekms@microsoft.com>
Thu, 16 Mar 2017 00:38:04 +0000 (17:38 -0700)
commitea2373964000ff86ecbb8ecd2b8586b6cc816be8
treeb039bfdb6c1d4e4fcab95cdbb5580b3b4ec8f591
parent50cdbbe00fa116de2ea53559aacc7b06cd253458
Fix ToTitleCase Functionality for Dutch Cultures (dotnet/coreclr#10195)

* Add Methods to Handle Dutch Titlecasing

Added the `IsDutchCulture` and `IsIjAtCurrentPosition` methods to handle
resolving a special-case for Dutch titlecasing, which should properly
capitalize any instances of "IJ" at the beginning of a titlecased word.

* Moved `IsDutchCase()` Call Into Local Variable

Moved the check for Dutch culture outside of the title-loop to avoid unnecessary evaluations.

* Performance Changes and Improvements to Dutch Titlecasing

Removed `IsDutchCulture()` method in favor of an inline approach relying
on the `StartsWith()` method; Remove the `IsIjAtCurrentPosition()`
method in favor of another inline approach to improve performance.

* Minor Formatting Change

Added space for `isDutchCulture` line, as it managed to disappear somewhere along the way.

Commit migrated from https://github.com/dotnet/coreclr/commit/50232d6448e63ccd04fa9e92199292621b049d5c
src/coreclr/src/mscorlib/src/System/Globalization/TextInfo.cs