MCPcopy Create free account
hub / github.com/crawl/crawl / _buffer_to_string

Function _buffer_to_string

crawl-ref/source/macro.cc:907–923  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

905}
906
907static string _buffer_to_string()
908{
909 string s;
910 for (const int k : Buffer)
911 {
912 if (k > 0 && k <= numeric_limits<unsigned char>::max())
913 {
914 char c = static_cast<unsigned char>(k);
915 if (c == '[' || c == ']')
916 s += "\\";
917 s += c;
918 }
919 else
920 s += make_stringf("[%d]", k);
921 }
922 return s;
923}
924
925/*
926 * Flush the buffer. Later we'll probably want to give the player options

Callers 1

flush_input_bufferFunction · 0.85

Calls 1

make_stringfFunction · 0.85

Tested by

no test coverage detected