How to find the Unicode bidirectional character type in C #?

Is there a way to find the bidirectional Unicode character character in C #?

I want to look at the characters in a string and decide if they are all strong LTR, strong RTL, a mixture of strong LTR and neutral, etc.

+7
source share
1 answer

System.Globalization.CharUnicodeInfo.GetBidiCategory(ch) is your friend.

The problem is that the function is internal. This MichKap (RIP) blog post shows you how to call it reflection.

+6
source

All Articles