+}
+
+bool IntToHex(int *number, std::string *hexString, int hexFill){
+
+ stringstream stringData;
+ stringData << setfill('0') << hex << setw(hexFill) << (*number);
+ (*hexString) = stringData.str();
+
+ return true;
+
+}
+
+void SplitPathFilename(string *calendarEntryHREF, string *entryURIPath,
+ string *entryFilename){
+
+ // Look for the last forward slash.
+
+ int lastForwardSlash = -1;
+ int charSeek = 0;
+ string stringIterChar = "";
+
+ for (string::iterator stringIter = calendarEntryHREF->begin();
+ stringIter != calendarEntryHREF->end(); stringIter++){
+
+ stringIterChar = *stringIter;
+
+ if (stringIterChar == "/"){
+ lastForwardSlash = charSeek;
+ }
+
+ charSeek++;
+
+ }
+
+ if (lastForwardSlash == -1){
+
+ return;
+
+ }
+
+ // Get the string before the last hash for the path.
+
+ (*entryURIPath) = calendarEntryHREF->substr(0, (lastForwardSlash + 1));
+
+ // Get the string after the last hash for the filename.
+
+ (*entryFilename) = calendarEntryHREF->substr((lastForwardSlash + 1));
+
+}
+
+string OutputText(string *textInput){
+
+ string outputTextData;
+ string 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;
+