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

Method getClipboardTextCp437Multiline

library/modules/DFSDL.cpp:267–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267DFHACK_EXPORT bool DFHack::getClipboardTextCp437Multiline(vector<string> * lines) {
268 CHECK_NULL_POINTER(lines);
269
270 if (!g_sdl_handle || g_SDL_HasClipboardText() != SDL_TRUE)
271 return false;
272 char *text = tabs_to_spaces(g_SDL_GetClipboardText());
273 vector<string> utf8_lines;
274 split_string(&utf8_lines, normalize_newlines(text), "\n");
275 DFHack::DFSDL::DFSDL_free(text);
276
277 for (auto utf8_line : utf8_lines)
278 lines->emplace_back(UTF2DF(utf8_line));
279
280 return true;
281}
282
283DFHACK_EXPORT bool DFHack::setClipboardTextCp437(string text) {
284 if (!g_sdl_handle)

Callers

nothing calls this directly

Calls 4

tabs_to_spacesFunction · 0.85
split_stringFunction · 0.85
normalize_newlinesFunction · 0.85
UTF2DFFunction · 0.85

Tested by

no test coverage detected