简体   繁体   English

Boost Locale –直接访问ICU功能

[英]Boost Locale – accessing ICU functions directly

I recently began using Boost Locale traversing and boundary analysis of Unicode strings. 我最近开始使用Boost Locale遍历和Unicode字符串边界分析。 I've used some of the features available for case conversion, ie: to_upper() , which appears to wrap ICU's toUpper() function. 我使用了一些可用于大小写转换的功能,即: to_upper() ,它似乎包装了ICU的toUpper()函数。

I didn't find Boost Locale wrappers for other ICU functions such as u_isalpha() or u_isalnum() . 我找不到其他ICU功能(如u_isalpha()u_isalnum())的 Boost Locale包装器。 How can I these use these ICU functions? 这些人如何使用这些ICU功能?

Thank you! 谢谢!

This will depend on how you're building Boost.Locale & linking against ICU. 这将取决于您如何构建Boost.Locale以及如何针对ICU进行链接。 If for example you're linking against dynamic ICU libraries (eg Boost dll/so/dylib relies on ICU dll/so/dylib) or linking in ICU directly to satisfy the dependency, then you simply need to include the proper ICU header(s) and call the APIs. 例如,如果您要链接到动态ICU库(例如Boost dll / so / dylib依赖于ICU dll / so / dylib)或直接在ICU中链接以满足相关性,那么您只需要包括适当的ICU标头即可)并调用API。

For example, u_isalpha() is found in uchar.h 例如,在uchar.h中找到u_isalpha()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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