MCPcopy Create free account
hub / github.com/DFHack/dfhack / copySTLString

Function copySTLString

library/include/MemAccess.h:211–217  ·  view source on GitHub ↗

* attempt to copy a string from source address to target address. may truncate or leak, depending on platform * @return length copied */

Source from the content-addressed store, hash-verified

209 * @return length copied
210 */
211 size_t copySTLString(const void* address, const uintptr_t target)
212 {
213 std::string* strsrc = (std::string*)address;
214 std::string* str = (std::string*)target;
215 str->assign(*strsrc);
216 return str->size();
217 }
218
219 /// get class name of an object with rtti/type info
220 std::string doReadClassName(void* vptr);

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected