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

Function DF2UTF

library/MiscUtils.cpp:608–621  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

606};
607
608std::string DF2UTF(const std::string &in)
609{
610 std::string out;
611 out.reserve(in.size());
612
613 uint8_t buf[4];
614 for (size_t i = 0; i < in.size(); i++)
615 {
616 int cnt = encode(buf, character_table[(uint8_t)in[i]]);
617 out.append(&buf[0], &buf[cnt]);
618 }
619
620 return out;
621}
622
623std::string UTF2DF(const std::string &in)
624{

Callers 15

string DF2CONSOLEMethod · 0.85
describeNameMethod · 0.85
describeNameTripleMethod · 0.85
df2utfFunction · 0.85
setClipboardTextCp437Method · 0.85
GetMaterialListFunction · 0.85
GetGrowthListFunction · 0.85
GetUnitListInsideFunction · 0.85
GetMapInfoFunction · 0.85
GetWorldMapCenterFunction · 0.85
GetWorldMapFunction · 0.85

Calls 3

reserveMethod · 0.80
encodeFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected