简体   繁体   中英

How do I find a Unicode character's bidirectional character type in C#?

Is there any way I can find a Unicode character's bidirectional character type in C#?

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

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 using reflection.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM