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

Function WizHTMLAppendTextInHead

src/share/WizMisc.cpp:2505–2525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2503}
2504
2505void WizHTMLAppendTextInHead(const QString& strText, QString& strHTML)
2506{
2507 ptrdiff_t nPos = 0;
2508 int from = 0;
2509 while (1)
2510 {
2511 nPos = strHTML.indexOf("</head", from, Qt::CaseInsensitive);
2512 if (-1 == nPos)
2513 {
2514 nPos = 0;
2515 break;
2516 }
2517 //
2518 if (!WizHTMLIsInCommentsBlock(strHTML, nPos))
2519 break;
2520 //
2521 from = nPos + 6;
2522 }
2523 //
2524 strHTML.insert(int(nPos), strText);
2525}
2526
2527
2528

Callers 1

Calls 1

WizHTMLIsInCommentsBlockFunction · 0.85

Tested by

no test coverage detected