Auto merge of #510 - Antti:add-wcstombs, r=alexcrichton

Add wcstombs

Add `wcstombs` function to convert from wide chars to multibyte chars.

The `wcstombs(`) function conforms to ISO/IEC 9899:1999 (ISO C99)
This commit is contained in:
bors 2017-02-03 19:36:51 +00:00
commit b491fb30d5

View file

@ -243,6 +243,7 @@ extern {
pub fn strtok(s: *mut c_char, t: *const c_char) -> *mut c_char; pub fn strtok(s: *mut c_char, t: *const c_char) -> *mut c_char;
pub fn strxfrm(s: *mut c_char, ct: *const c_char, n: size_t) -> size_t; pub fn strxfrm(s: *mut c_char, ct: *const c_char, n: size_t) -> size_t;
pub fn wcslen(buf: *const wchar_t) -> size_t; pub fn wcslen(buf: *const wchar_t) -> size_t;
pub fn wcstombs(dest: *mut c_char, src: *const wchar_t, n: size_t) -> ::size_t;
pub fn memchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void; pub fn memchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void;
pub fn memcmp(cx: *const c_void, ct: *const c_void, n: size_t) -> c_int; pub fn memcmp(cx: *const c_void, ct: *const c_void, n: size_t) -> c_int;