MCPcopy Create free account
hub / github.com/WinMerge/winmerge / GetDiffStatusString

Method GetDiffStatusString

Src/MergeFrameCommon.cpp:271–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271String CMergeFrameCommon::GetDiffStatusString(int curDiffIndex, int diffCount)
272{
273 if (diffCount == 0)
274 return _("Identical");
275 if (diffCount < 0)
276 return _("Different");
277
278 if (curDiffIndex < 0)
279 return diffCount == 1 ? _("1 Difference Found") :
280 strutils::format_string1(_("%1 Differences Found"), strutils::to_str(diffCount));
281
282 tchar_t sCnt[32] {};
283 tchar_t sIdx[32] {};
284 String s = I18n::LoadString(IDS_DIFF_NUMBER_STATUS_FMT);
285 const int signInd = curDiffIndex;
286 _itot_s(signInd + 1, sIdx, 10);
287 strutils::replace(s, _T("%1"), sIdx);
288 _itot_s(diffCount, sCnt, 10);
289 strutils::replace(s, _T("%2"), sCnt);
290 return s;
291}
292
293static String GetTitleStringFlags(const IMergeDoc& mergeDoc)
294{

Callers

nothing calls this directly

Calls 4

LoadStringFunction · 0.85
format_string1Function · 0.50
to_strFunction · 0.50
replaceFunction · 0.50

Tested by

no test coverage detected