开发者

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

开发者 https://www.devze.com 2023-04-01 04:03 出处:网络
Is there any way I can fi开发者_开发知识库nd a Unicode character\'s bidirectional character type in C#?

Is there any way I can fi开发者_开发知识库nd 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号