Function opencc_sys::opencc_convert_utf8

source ·
pub unsafe extern "C" fn opencc_convert_utf8(
    opencc: opencc_t,
    input: *const c_char,
    length: usize
) -> *mut c_char
Expand description

Converts UTF-8 std::string This function returns an allocated C-Style std::string, which stores the converted std::string. You MUST call opencc_convert_utf8_free() to release allocated memory.

@param opencc The opencc description pointer. @param input The UTF-8 encoded std::string. @param length The maximum length in byte to convert. If length is (size_t)-1, the whole std::string (terminated by ‘\0’) will be converted.

@return The newly allocated UTF-8 std::string that stores text converted, or NULL on error. @ingroup opencc_c_api