StringComparison,为什么 "TH" 不是以 "T" 开头
StringComparison, why "TH" not start with "T"
我正在使用 StringComparison
、"vi-VN"
文化;为什么比较字符串 "TH"
or "Th".StartsWith("T", StringComparison.CurrentCulture)
return false
?
Th
is a grapheme in Vietnamese。它是一个文本单元,而不是英语中的两个文本单元。因此,Th
不以 T
开头,因为它是它自己的独特字符。
您需要使用能够区分 Th
与字母 T
和 h
的区域性。例如:
"Th".StartsWith("T", StringComparison.InvariantCulture)
我正在使用 StringComparison
、"vi-VN"
文化;为什么比较字符串 "TH"
or "Th".StartsWith("T", StringComparison.CurrentCulture)
return false
?
Th
is a grapheme in Vietnamese。它是一个文本单元,而不是英语中的两个文本单元。因此,Th
不以 T
开头,因为它是它自己的独特字符。
您需要使用能够区分 Th
与字母 T
和 h
的区域性。例如:
"Th".StartsWith("T", StringComparison.InvariantCulture)