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

Method getClipboardTextCp437

library/modules/DFSDL.cpp:258–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256}
257
258DFHACK_EXPORT string DFHack::getClipboardTextCp437() {
259 if (!g_sdl_handle || g_SDL_HasClipboardText() != SDL_TRUE)
260 return "";
261 char *text = tabs_to_spaces(g_SDL_GetClipboardText());
262 string textcp437 = UTF2DF(normalize_newlines(text, true));
263 DFHack::DFSDL::DFSDL_free(text);
264 return textcp437;
265}
266
267DFHACK_EXPORT bool DFHack::getClipboardTextCp437Multiline(vector<string> * lines) {
268 CHECK_NULL_POINTER(lines);

Callers

nothing calls this directly

Calls 3

tabs_to_spacesFunction · 0.85
UTF2DFFunction · 0.85
normalize_newlinesFunction · 0.85

Tested by

no test coverage detected