00001 00002 // Common Text Transformation Library 00003 // Copyright (C) 1997-2006 by Igor Kholodov. 00004 // 00005 // This library is free software; you can redistribute it and/or 00006 // modify it under the terms of the GNU Lesser General Public 00007 // License as published by the Free Software Foundation; either 00008 // version 2.1 of the License, or (at your option) any later version. 00009 // 00010 // This library is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 // Lesser General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU Lesser General Public 00016 // License along with this library; if not, write to the 00017 // Free Software Foundation, Inc., 00018 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00019 // 00020 // mailto:cttl@users.sourceforge.net 00021 // http://sourceforge.net/projects/cttl/ 00023 00029 // itos.h 00030 00031 #ifndef _CTTL_ITOS_H_INCLUDED_ 00032 #define _CTTL_ITOS_H_INCLUDED_ 00033 00034 #include <cassert> 00035 #include <sstream> 00036 #include <string> 00037 #include <cstdio> 00038 00039 namespace cttl { 00040 00058 CTTL_STD_STRING itos( int i_ ) 00059 { 00060 std::basic_stringstream< CTTL_STD_CHAR > stream_; 00061 stream_ << i_; 00062 return stream_.str(); 00063 } 00064 00065 } // namespace cttl 00066 00067 #endif // _CTTL_ITOS_H_INCLUDED_