Function opencc_sys::opencc_convert_utf8_to_buffer

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

Converts UTF-8 std::string

@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. @param output The buffer to store converted text. You MUST make sure this buffer has sufficient space.

@return The length of converted std::string or (size_t)-1 on error.

@ingroup opencc_c_api