MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / ReplaceTarget

Method ReplaceTarget

scintilla/src/Editor.cxx:7363–7382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7361}
7362
7363int Editor::ReplaceTarget ( bool replacePatterns, const char *text, int length )
7364{
7365 UndoGroup ug ( pdoc );
7366 if ( length == -1 ) {
7367 length = istrlen ( text );
7368 }
7369 if ( replacePatterns ) {
7370 text = pdoc->SubstituteByPosition ( text, &length );
7371 if ( !text ) {
7372 return 0;
7373 }
7374 }
7375 if ( targetStart != targetEnd ) {
7376 pdoc->DeleteChars ( targetStart, targetEnd - targetStart );
7377 }
7378 targetEnd = targetStart;
7379 pdoc->InsertString ( targetStart, text, length );
7380 targetEnd = targetStart + length;
7381 return length;
7382}
7383
7384bool Editor::IsUnicodeMode() const
7385{

Callers

nothing calls this directly

Calls 4

istrlenFunction · 0.85
SubstituteByPositionMethod · 0.80
DeleteCharsMethod · 0.45
InsertStringMethod · 0.45

Tested by

no test coverage detected