Changeset 2604 for box/trunk/lib/common/Logging.cpp
- Timestamp:
- 10/02/2010 19:01:12 (2 years ago)
- File:
-
- 1 edited
-
box/trunk/lib/common/Logging.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/lib/common/Logging.cpp
r2546 r2604 496 496 return true; 497 497 } 498 499 std::string PrintEscapedBinaryData(const std::string& rInput) 500 { 501 std::ostringstream output; 502 503 for (size_t i = 0; i < rInput.length(); i++) 504 { 505 if (isprint(rInput[i])) 506 { 507 output << rInput[i]; 508 } 509 else 510 { 511 output << "\\x" << std::hex << std::setw(2) << 512 std::setfill('0') << (int) rInput[i] << 513 std::dec; 514 } 515 } 516 517 return output.str(); 518 }
Note: See TracChangeset
for help on using the changeset viewer.
