Move rich text escape methods to helper .h .cpp files

This commit is contained in:
2023-04-27 17:07:08 +02:00
parent 76041027df
commit 7e17dcf7d8
5 changed files with 27 additions and 14 deletions
+18
View File
@@ -0,0 +1,18 @@
#include "richtexthelper.h"
// 3rdparty lib includes
#include <strutils.h>
namespace espgui {
void richTextEscape(std::string &subject)
{
cpputils::stringReplaceAll('&', "&&", subject);
}
std::string richTextEscape(std::string_view subject)
{
return cpputils::stringReplaceAll('&', "&&", subject);
}
} // namespace espgui