Make strlcpy available in folly, second attempt
authorChip Turner <chip@fb.com>
Mon, 21 Sep 2015 20:42:50 +0000 (13:42 -0700)
committerfacebook-github-bot-1 <folly-bot@fb.com>
Mon, 21 Sep 2015 21:20:18 +0000 (14:20 -0700)
commit9722033f9009b184b4c669cdc53e85e7567c482a
treea88b8b4d73bba7f37cdaa8f60ab631cff9e7258e
parentbe90fbfb2424ba27822e9055283896cefc9eafd2
Make strlcpy available in folly, second attempt

Summary: strncpy is bad.  strlcpy is somewhat less bad.  We already had
this function, but let's move it somewhere more reasonable.

This would make sense to live in String.h, but then we have circular
dependencies.  Since String.h includes Demangle.h, though, you get
strlcpy by including it, so this should be okay enough.

Reviewed By: @lbrandy

Differential Revision: D2097590
folly/Demangle.cpp
folly/Demangle.h
folly/test/DemangleTest.cpp