MCPcopy Create free account
hub / github.com/BVLC/caffe / CloneCString

Method CloneCString

src/gtest/gtest-all.cpp:2152–2155  ·  view source on GitHub ↗

Clones a 0-terminated C string, allocating memory using new. The caller is responsible for deleting[] the return value. Returns the cloned string, or NULL if the input is NULL.

Source from the content-addressed store, hash-verified

2150// caller is responsible for deleting[] the return value. Returns the
2151// cloned string, or NULL if the input is NULL.
2152const char * String::CloneCString(const char* c_str) {
2153 return (c_str == NULL) ?
2154 NULL : CloneString(c_str, strlen(c_str));
2155}
2156
2157#if GTEST_OS_WINDOWS_MOBILE
2158// Creates a UTF-16 wide string from the given ANSI string, allocating

Callers

nothing calls this directly

Calls 1

CloneStringFunction · 0.85

Tested by

no test coverage detected