XUtils

bindbc-icu

bindbc bindings for the unicode ICU library.


For static linking, use subconfigurations in addition to dependencies.

"dependencies": {
    "bindbc-icu": "~>70.1",
}
"subConfigurations": {
    "bindbc-icu": "static"
}

Then, you can use any symbols of icu4c as following:

import bindbc.icu;

bindbc.icu bindbc.icu automatically selects and imports definitions(bindbc.icu.bindstatic) for static linking. Then you can use ICU’s C language function definitions and related structs, enums, etc. In particular, ICU functions are characterized by a versioned function name (symbol), but you can use the aliasing name without versions. Inside the library, create the alias as following:

UCharsetDetector* ucsdet_open_70(UErrorCode* status) @system;   // real symbol
alias ucsdet_open = ucsdet_open_70;                             // usable alias

Articles

  • coming soon...