4

It was really strange for me. The following code returns true for every string. The character is Arabic Tatweel (U+640).

"abcd".StartsWith("ـــــــــــــ") ;//returns true

But when I change the StringComparer to StringComparison.Ordinal it returns false

"abcd".StartsWith("ـــــــــــــ", StringComparison.Ordinal) ;//returns false

Can someone elaborate on the reasons for this behavior and how I could know other characters that may have this behavior?

JLRishe
  • 95,368
  • 17
  • 122
  • 158
Ehsan88
  • 3,145
  • 5
  • 26
  • 47

0 Answers0