MCPcopy Create free account
hub / github.com/cinder/Cinder / normalizeEOL

Function normalizeEOL

src/jsoncpp/jsoncpp.cpp:518–535  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

516}
517
518static std::string normalizeEOL(Reader::Location begin, Reader::Location end) {
519 std::string normalized;
520 normalized.reserve(end - begin);
521 Reader::Location current = begin;
522 while (current != end) {
523 char c = *current++;
524 if (c == '\r') {
525 if (current != end && *current == '\n')
526 // convert dos EOL
527 ++current;
528 // convert Mac EOL
529 normalized += '\n';
530 } else {
531 normalized += c;
532 }
533 }
534 return normalized;
535}
536
537void
538Reader::addComment(Location begin, Location end, CommentPlacement placement) {

Callers 1

addCommentMethod · 0.85

Calls 1

reserveMethod · 0.45

Tested by

no test coverage detected