Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Move INSTALL, LICENSE, README, THANKS and TODO into root directory
[xestiaab/.git] / source / common / textprocessing.cpp
index b9832e5..2a61591 100644 (file)
@@ -96,7 +96,7 @@ void ResetUnusedString(wxString *ProcessString)
        // Reset an unused string.
 
        ProcessString->Replace(wxT("\\\\"), wxT("\\"), TRUE);
-       ProcessString->Replace(wxT("\n"), wxT(""), TRUE);
+       ProcessString->Replace(wxT("\\n"), wxT("\n"), TRUE);
        ProcessString->Replace(wxT("\\;"), wxT(";"), TRUE);
        ProcessString->Replace(wxT("\\,"), wxT(","), TRUE);
 
@@ -179,18 +179,42 @@ bool MapDataExists(int *ItemIndex, std::map<int,int> *MapPtr){
 
 }
 
-/*
-template <typename ArgMap, typename... Args>
-void DeleteMapData(ArgMap* ArgMapPtr, Args*... ArgsList){
-
-       //DeleteMapDataProcess(ArgMapPtr);
-
-       DeleteMapData(ArgsList...);
-
-}
-*/
-/*
-void test(int* x) {
+wxString OutputText(wxString *TextInput){
+       
+       wxString OutputTextData;
+       wxString OutputLine;
+       int CharSeek = 0;
+       int LineSeek = 0;
+       int MaxLineSeek = 77;
+       
+       for (CharSeek = 0; CharSeek < TextInput->size(); CharSeek++){
+               
+               LineSeek++;
+               
+               if (LineSeek == MaxLineSeek){
+
+                       if (TextInput->substr(CharSeek, 1) != "\n"){
+                               OutputLine += TextInput->substr(CharSeek, 1);
+                       }
+                       OutputLine += "\n";
+                       OutputTextData += OutputLine;
+                       OutputLine = " ";
+                       LineSeek = 0;
+                       MaxLineSeek = 76;
+                       continue;
+                       
+               }
+               
+               OutputLine += TextInput->substr(CharSeek, 1);
+               
+       }
 
-}
-*/
\ No newline at end of file
+       if (OutputLine != " " && OutputLine != " \n"){
+       
+               OutputTextData += OutputLine;
+               
+       }
+       
+       return OutputTextData;
+       
+}
\ No newline at end of file
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy