[libc] add strndup
authorMichael Jones <michaelrj@google.com>
Fri, 29 Oct 2021 20:43:05 +0000 (13:43 -0700)
committerMichael Jones <michaelrj@google.com>
Mon, 1 Nov 2021 19:52:51 +0000 (12:52 -0700)
commit3bbbec1ae7b7b3c3dc4e6a1801fb5bdb930aad79
treeede7fa20318c05b6389ef60b1a8be52a37d132ee
parentd51a8296d374122c937df708f5fa1500218baa5c
[libc] add strndup

add an implementation of strndup

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D112846
libc/config/linux/x86_64/entrypoints.txt
libc/spec/stdc.td
libc/src/string/CMakeLists.txt
libc/src/string/strndup.cpp [new file with mode: 0644]
libc/src/string/strndup.h [new file with mode: 0644]
libc/test/src/string/CMakeLists.txt
libc/test/src/string/strndup_test.cpp [new file with mode: 0644]