Chris@16: #ifndef _STRING_CONVERT_HPP___ Chris@16: #define _STRING_CONVERT_HPP___ Chris@16: Chris@16: /* Copyright (c) 2005 CrystalClear Software, Inc. Chris@16: * Subject to the Boost Software License, Version 1.0. (See accompanying Chris@16: * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) Chris@16: * Author: Jeff Garland, Bart Garst Chris@101: * $Date$ Chris@16: */ Chris@16: Chris@16: #include "boost/date_time/compiler_config.hpp" Chris@16: #include Chris@16: Chris@16: namespace boost { Chris@16: namespace date_time { Chris@16: Chris@16: //! Converts a string from one value_type to another Chris@16: /*! Converts a wstring to a string (or a string to wstring). If both template parameters Chris@16: * are of same type, a copy of the input string is returned. */ Chris@16: template Chris@16: inline Chris@16: std::basic_string convert_string_type(const std::basic_string& inp_str) Chris@16: { Chris@16: typedef std::basic_string output_type; Chris@16: output_type result; Chris@16: result.insert(result.begin(), inp_str.begin(), inp_str.end()); Chris@16: return result; Chris@16: } Chris@16: Chris@16: }} // namespace boost::date_time Chris@16: Chris@16: #endif // _STRING_CONVERT_HPP___