MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / normalizeEOL

Function normalizeEOL

src/share/jsoncpp/jsoncpp.cpp:590–607  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

addCommentMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected