Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added OutputText function
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Tue, 28 Jun 2016 21:54:53 +0000 (22:54 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Tue, 28 Jun 2016 21:54:53 +0000 (22:54 +0100)
source/common/textprocessing.cpp
source/common/textprocessing.h

index 9d6c8ff..b73252d 100644 (file)
@@ -177,4 +177,44 @@ bool MapDataExists(int *ItemIndex, std::map<int,int> *MapPtr){
        
        }
 
+}
+
+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);
+               
+       }
+
+       if (OutputLine != " "){
+       
+               OutputTextData += OutputLine;
+               
+       }
+       
+       return OutputTextData;
+       
 }
\ No newline at end of file
index 7a63ea0..97ea9a1 100644 (file)
@@ -39,6 +39,8 @@ void DeleteMapDataProcess(int IndexNum, std::map<int, int>* MapData);
 bool MapDataExists(int *ItemIndex, std::map<int,wxString> *MapPtr);
 bool MapDataExists(int *ItemIndex, std::map<int,int> *MapPtr);
 
+wxString OutputText(wxString *TextInput);
+
 //void DeleteMapDataB() {};
 
 //void DeleteMapData() {};
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