MCPcopy Create free account
hub / github.com/Tablecruncher/tablecruncher / padInteger

Method padInteger

src/helper.cpp:488–494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

486
487
488std::string Helper::padInteger(int num, int length) {
489 char buf[101];
490 std::string formatString = "%0"+std::to_string(length)+"d";
491 std::snprintf(buf,100,formatString.c_str(),num);
492 std::string ret = buf;
493 return(ret);
494}
495
496// https://stackoverflow.com/questions/5840148/how-can-i-get-a-files-size-in-c
497long Helper::getFileSize(std::string filename) {

Callers

nothing calls this directly

Calls 1

to_stringFunction · 0.85

Tested by

no test coverage detected