.net core / standard string.ToLower () does not have a culture parameter

In .net fx I can do

myString.ToLower(frenchCulture);

But when viewing the .net kernel or the .net standard, there is no longer a culture parameter that can be passed. There is only string.ToLower()andstring.ToLowerInvariant()

If the culture is simply skipped? But shouldn't problems then arise when the string culture is not the current culture?

Any hints on the reason for this?

When I have the idea of ​​an invariant culture, I can use ToLowerInvariant().

But what about use cases when I have to use string.ToLower()in a culture that is not the current culture?

+4
source share
1 answer

, , . :

string output = input.ToLower(culture);

string output = culture.TextInfo.ToLower(input);

, ​​ netstandard2.0. - .

+9

Source: https://habr.com/ru/post/1677842/


All Articles