From 479f4afdf817cfb62af4dc6ff4f90264cd42bc29 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 10 Jan 2016 18:49:32 +0000 Subject: [PATCH] Added ResetUnusedString to textprocessing.{cpp,h} --- source/common/textprocessing.cpp | 10 ++++++++++ source/common/textprocessing.h | 1 + 2 files changed, 11 insertions(+) diff --git a/source/common/textprocessing.cpp b/source/common/textprocessing.cpp index d979d30..aeec7a8 100644 --- a/source/common/textprocessing.cpp +++ b/source/common/textprocessing.cpp @@ -80,6 +80,16 @@ void CaptureString(wxString *ProcessString, bool StripQuotes) } +void ResetUnusedString(wxString *ProcessString) +{ + + ProcessString->Replace(wxT("\\\\"), wxT("\\"), TRUE); + ProcessString->Replace(wxT("\n"), wxT(""), TRUE); + ProcessString->Replace(wxT("\\;"), wxT(";"), TRUE); + ProcessString->Replace(wxT("\\,"), wxT(","), TRUE); + +} + void ConvertToHTML(wxString *ProcessString) { diff --git a/source/common/textprocessing.h b/source/common/textprocessing.h index 78ddf2b..7a63ea0 100644 --- a/source/common/textprocessing.h +++ b/source/common/textprocessing.h @@ -28,6 +28,7 @@ void GetEscapeString(wxTextCtrl *TextCtrl, wxString *ProcessString, bool StripQu void GetEscapeString(wxComboBox *ComboCtrl, wxString *ProcessString, bool StripQuotes); void GetEscapeString(wxChoice *ChoiceCtrl, wxString *ProcessString, bool StripQuotes); void CaptureString(wxString *ProcessString, bool StripQuotes); +void ResetUnusedString(wxString *ProcessString); void ConvertToHTML(wxString *ProcessString); void DeleteMapDataProcess(int IndexNum, std::map* MapData); -- 2.39.2