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

Function tabs_to_spaces

library/modules/DFSDL.cpp:238–244  ·  view source on GitHub ↗

convert tabs to spaces so they don't get converted to '?'

Source from the content-addressed store, hash-verified

236
237// convert tabs to spaces so they don't get converted to '?'
238static char * tabs_to_spaces(char *str) {
239 for (char *c = str; *c; ++c) {
240 if (*c == '\t')
241 *c = ' ';
242 }
243 return str;
244}
245
246static string normalize_newlines(const string & str, bool to_spaces = false) {
247 string normalized_str = str;

Callers 2

getClipboardTextCp437Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected