MCPcopy Create free account
hub / github.com/Illumina/paragraph / normalizeEOL

Method normalizeEOL

external/jsoncpp/jsoncpp.cpp:586–603  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

584}
585
586JSONCPP_STRING Reader::normalizeEOL(Reader::Location begin, Reader::Location end) {
587 JSONCPP_STRING normalized;
588 normalized.reserve(static_cast<size_t>(end - begin));
589 Reader::Location current = begin;
590 while (current != end) {
591 char c = *current++;
592 if (c == '\r') {
593 if (current != end && *current == '\n')
594 // convert dos EOL
595 ++current;
596 // convert Mac EOL
597 normalized += '\n';
598 } else {
599 normalized += c;
600 }
601 }
602 return normalized;
603}
604
605void
606Reader::addComment(Location begin, Location end, CommentPlacement placement) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected