mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
CComponentsText: add helper to convert integer to string
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user