/*
- * Copyright 2015 Facebook, Inc.
+ * Copyright 2016 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
} // namespace
-size_t strlcpy(char* dest, const char* const src, size_t size) {
- size_t len = strlen(src);
- if (size != 0) {
- size_t n = std::min(len, size - 1); // always null terminate!
- memcpy(dest, src, n);
- dest[n] = '\0';
- }
- return len;
-}
-
size_t demangle(const char* name, char* out, size_t outSize) {
DemangleBuf dbuf;
dbuf.dest = out;
#endif
+size_t strlcpy(char* dest, const char* const src, size_t size) {
+ size_t len = strlen(src);
+ if (size != 0) {
+ size_t n = std::min(len, size - 1); // always null terminate!
+ memcpy(dest, src, n);
+ dest[n] = '\0';
+ }
+ return len;
+}
+
} // folly