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
  • 99,490
  • 19
  • 131
  • 169
Ehsan88
  • 3,569
  • 5
  • 29
  • 52

0 Answers0