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

Function join_strings

library/include/MiscUtils.h:423–436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421
422template<typename T>
423inline std::string join_strings(const std::string &separator, T &items) {
424 std::stringstream ss;
425
426 bool first = true;
427 for (auto &item : items) {
428 if (first)
429 first = false;
430 else
431 ss << separator;
432 ss << item;
433 }
434
435 return ss.str();
436}
437
438DFHACK_EXPORT char toupper_cp437(char c);
439DFHACK_EXPORT char tolower_cp437(char c);

Callers 2

bitfield_to_stringFunction · 0.70
flagarray_to_stringFunction · 0.70

Calls 1

strMethod · 0.45

Tested by

no test coverage detected