StringComparison why "TH" does not start with "T"

I use culture StringComparison, "vi-VN"; Why does string comparison "TH"or "Th".StartsWith("T", StringComparison.CurrentCulture)returns false?

+4
source share
1 answer

Th- grapheme in Vietnamese . This is a single unit of text, not two units of text, as it would be in English. Thus, Thdoes not start with T, since it is its own unique symbol.

You will need to use a culture that distinguishes between Thletters Tand h. For instance:

"Th".StartsWith("T", StringComparison.InvariantCulture)
+6
source

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


All Articles