Skip to content
Snippets Groups Projects
Unverified Commit 29b27da9 authored by Yuki Okushi's avatar Yuki Okushi Committed by GitHub
Browse files

Merge pull request #1730 from NeoRaider/unix-strndup

unix: add strndup()
parents 4c07b661 3913f5c4
No related branches found
No related tags found
No related merge requests found
...@@ -525,6 +525,7 @@ extern "C" { ...@@ -525,6 +525,7 @@ extern "C" {
pub fn strspn(cs: *const c_char, ct: *const c_char) -> size_t; pub fn strspn(cs: *const c_char, ct: *const c_char) -> size_t;
pub fn strcspn(cs: *const c_char, ct: *const c_char) -> size_t; pub fn strcspn(cs: *const c_char, ct: *const c_char) -> size_t;
pub fn strdup(cs: *const c_char) -> *mut c_char; pub fn strdup(cs: *const c_char) -> *mut c_char;
pub fn strndup(cs: *const c_char, n: size_t) -> *mut c_char;
pub fn strpbrk(cs: *const c_char, ct: *const c_char) -> *mut c_char; pub fn strpbrk(cs: *const c_char, ct: *const c_char) -> *mut c_char;
pub fn strstr(cs: *const c_char, ct: *const c_char) -> *mut c_char; pub fn strstr(cs: *const c_char, ct: *const c_char) -> *mut c_char;
pub fn strcasecmp(s1: *const c_char, s2: *const c_char) -> c_int; pub fn strcasecmp(s1: *const c_char, s2: *const c_char) -> c_int;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment