MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / foreach

Function foreach

3rdparty/diff-match-patch/diff_match_patch.cpp:138–152  ·  view source on GitHub ↗

Escape the body of the patch with %xx notation.

Source from the content-addressed store, hash-verified

136 + QString(" @@\n");
137 // Escape the body of the patch with %xx notation.
138 foreach (Diff aDiff, diffs) {
139 switch (aDiff.operation) {
140 case INSERT:
141 text += QString('+');
142 break;
143 case DELETE:
144 text += QString('-');
145 break;
146 case EQUAL:
147 text += QString(' ');
148 break;
149 }
150 text += QString(QUrl::toPercentEncoding(aDiff.text, " !~*'();/?:@&=+$,#"))
151 + QString("\n");
152 }
153
154 return text;
155}

Callers

nothing calls this directly

Calls 12

numberClass · 0.85
PatchClass · 0.85
insertMethod · 0.80
leftMethod · 0.80
rightMethod · 0.80
DiffClass · 0.70
QStringClass · 0.50
lengthMethod · 0.45
replaceMethod · 0.45
isEmptyMethod · 0.45
appendMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected