4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Lars Gullik Bjønnes
10 * Full author contact details are available in file CREDITS.
12 * A collection of string helper functions that works with string.
13 * Some of these would certainly benefit from a rewrite/optimization.
19 #include "support/strfwd.h"
23 template <class Target, class Source>
24 Target convert(Source arg);
27 template<> std::string convert<std::string>(bool b);
28 template<> std::string convert<std::string>(char c);
29 template<> std::string convert<std::string>(short unsigned int sui);
30 template<> std::string convert<std::string>(int i);
31 template<> docstring convert<docstring>(int i);
32 template<> std::string convert<std::string>(unsigned int ui);
33 template<> docstring convert<docstring>(unsigned int ui);
34 template<> std::string convert<std::string>(unsigned long ul);
35 template<> docstring convert<docstring>(unsigned long ul);
36 template<> std::string convert<std::string>(long l);
37 template<> docstring convert<docstring>(long l);
38 template<> std::string convert<std::string>(float f);
39 template<> std::string convert<std::string>(double d);
40 template<> int convert<int>(std::string const s);
41 template<> int convert<int>(docstring const s);
42 template<> unsigned int convert<unsigned int>(std::string const s);
43 template<> unsigned long convert<unsigned long>(std::string const s);
44 template<> double convert<double>(std::string const s);
45 template<> int convert<int>(char const * cptr);
46 template<> double convert<double>(char const * cptr);