简体   繁体   中英

Boost Locale – accessing ICU functions directly

I recently began using Boost Locale traversing and boundary analysis of Unicode strings. I've used some of the features available for case conversion, ie: to_upper() , which appears to wrap ICU's toUpper() function.

I didn't find Boost Locale wrappers for other ICU functions such as u_isalpha() or u_isalnum() . How can I these use these ICU functions?

Thank you!

This will depend on how you're building Boost.Locale & linking against 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.

For example, u_isalpha() is found in uchar.h

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