Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
49 lines (38 loc) · 1.17 KB

File metadata and controls

49 lines (38 loc) · 1.17 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef REPLACEENTRY_H_DGB_20131120
#define REPLACEENTRY_H_DGB_20131120
namespace NppPythonScript
{
class ReplaceEntry {
public:
ReplaceEntry(int start, int length, const char* replacement, size_t replacementLength)
: m_start(start),
m_length(length),
m_replacementLength(replacementLength)
{
m_replacement = new char[replacementLength + 1];
memcpy(m_replacement, replacement, replacementLength);
m_replacement[replacementLength] = '\0';
}
ReplaceEntry(const ReplaceEntry& copy)
: m_start(copy.m_start),
m_length(copy.m_length),
m_replacementLength(copy.m_replacementLength)
{
m_replacement = new char[m_replacementLength];
memcpy(m_replacement, copy.m_replacement, m_replacementLength);
}
~ReplaceEntry() {
delete[] m_replacement;
}
int getStart() { return m_start; }
int getLength() { return m_length; }
char *getReplacement() { return m_replacement; }
size_t getReplacementLength() { return m_replacementLength; }
private:
int m_start;
int m_length;
size_t m_replacementLength;
char *m_replacement;
};
}
#endif
Morty Proxy This is a proxified and sanitized view of the page, visit original site.