RE: Glib::ustring conversion
- From: "cyril ponsan" <kikiloizo hotmail com>
 
- To: gtkmm-list gnome org
 
- Subject: RE: Glib::ustring conversion
 
- Date: Tue, 28 Jun 2005 19:47:37 +0000
 
Hello,
i use this method to convert int or double in a string so it should work for 
ustring ;)
string convertIntToString(int result)
{
	char buffer[100];
	sprintf(buffer, "%d", result);
	string str = buffer;
       return str;
}
and for string to int :
int stringToInt(string str)
{
	char buffer[100];
	int nb;
	strcpy(buffer, str.c_str());
	nb = atoi(buffer);
	return nb;
}
hope it can help you
_________________________________________________________________
Ne cherchez plus, trouvez ! Avec le nouveau MSN Search. 
http://search.msn.fr/
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]