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

Method InsertFromArray

scintilla/src/SplitVector.h:193–206  ·  view source on GitHub ↗

Insert text into the buffer from an array.

Source from the content-addressed store, hash-verified

191
192 /// Insert text into the buffer from an array.
193 void InsertFromArray(int positionToInsert, const T s[], int positionFrom, int insertLength) {
194 PLATFORM_ASSERT((positionToInsert >= 0) && (positionToInsert <= lengthBody));
195 if (insertLength > 0) {
196 if ((positionToInsert < 0) || (positionToInsert > lengthBody)) {
197 return;
198 }
199 RoomFor(insertLength);
200 GapTo(positionToInsert);
201 memmove(body + part1Length, s + positionFrom, sizeof(T) * insertLength);
202 lengthBody += insertLength;
203 part1Length += insertLength;
204 gapLength -= insertLength;
205 }
206 }
207
208 /// Delete one element from the buffer.
209 void Delete(int position) {

Callers 1

BasicInsertStringMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected