How do I determine a word boundary in Unicode stream in C#?

偶尔善良 提交于 2020-01-06 04:46:06

问题


I'm reading a Unicode stream and would rather not have to pass the entire string through a regex. Is there a simple (reliable) character I can use to break words across languages?

My byte array is likely going to be based in UTF-16 or UTF-8


回答1:


If you are using Java then you can use the BreakIterator.



来源:https://stackoverflow.com/questions/4900408/how-do-i-determine-a-word-boundary-in-unicode-stream-in-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!