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.
| 2150 | // caller is responsible for deleting[] the return value. Returns the |
| 2151 | // cloned string, or NULL if the input is NULL. |
| 2152 | const 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 |
nothing calls this directly
no test coverage detected