I am trying to call ulc_width_linebreaks from unilbrk from GNU's libunistring (a C function) on my Python strings using the ctypes module. libunistring is available on Ubuntu, and I've installed it with sudo apt install libunistring2 libunistring-dev. I opened a new terminal window and tried to import the library from Python. I tried the following but all returned None:
ctypes.util.find_library("libunistring")
ctypes.util.find_library("libunistring2")
ctypes.util.find_library("unilbrk")
ctypes.util.find_library("unilbrk.h")
You need to find the install location of the library, which you can do with
and then load it and call it like this