CComponentsText: add helper to convert integer to string

This commit is contained in:
2013-04-10 17:05:46 +02:00
parent 1bb07ddad8
commit 546b04b846
2 changed files with 14 additions and 0 deletions

View File

@@ -31,6 +31,7 @@
#include <global.h>
#include <neutrino.h>
#include "cc.h"
#include <sstream>
using namespace std;
@@ -206,3 +207,14 @@ void CComponentsText::removeLineBreaks(std::string& str)
spos = str.find_first_of("\r\n");
}
}
//helper, converts int to string
string CComponentsText::iToString(int int_val)
{
int i = int_val;
ostringstream i_str;
i_str << i;
string i_string(i_str.str());
return i_string;
}