Manager: Add feature to selectively comment and uncomment

This commit is contained in:
Riyyi
2022-01-24 00:29:50 +01:00
parent 7f8ca38462
commit abbf764a3e
4 changed files with 122 additions and 7 deletions
+8 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Riyyi
* Copyright (C) 2021-2022 Riyyi
*
* SPDX-License-Identifier: MIT
*/
@@ -55,6 +55,13 @@ File& File::append(std::string data)
return *this;
}
File& File::replace(size_t index, size_t length, const std::string& data)
{
m_data.replace(index, length, data);
return *this;
}
File& File::flush()
{
// Create output stream object and open file
+2 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Riyyi
* Copyright (C) 2021-2022 Riyyi
*
* SPDX-License-Identifier: MIT
*/
@@ -18,6 +18,7 @@ public:
void clear();
File& append(std::string data);
File& replace(size_t index, size_t length, const std::string& data);
File& flush();
const char* c_str() const { return m_data.c_str(); }