X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fstlplus%2Fstrings%2Fstring_inf.hpp;fp=src%2Fstlplus%2Fstrings%2Fstring_inf.hpp;h=15432630f83cda555130fb37421ceb13a5e5dd63;hp=0000000000000000000000000000000000000000;hb=6b0a0d0efafe34d48ab344fca3b479553bd4e62c;hpb=85783316365181491a3e3c0c63659972477cebba diff --git a/src/stlplus/strings/string_inf.hpp b/src/stlplus/strings/string_inf.hpp new file mode 100644 index 0000000..1543263 --- /dev/null +++ b/src/stlplus/strings/string_inf.hpp @@ -0,0 +1,40 @@ +#ifndef STLPLUS_STRING_INF +#define STLPLUS_STRING_INF +//////////////////////////////////////////////////////////////////////////////// + +// Author: Andy Rushton +// Copyright: (c) Southampton University 1999-2004 +// (c) Andy Rushton 2004-2009 +// License: BSD License, see ../docs/license.html + +// String conversion functions for the infinite precision integer type inf + +// The conversion supports all the formatting modes defined on format_types + +//////////////////////////////////////////////////////////////////////////////// +#include "strings_fixes.hpp" +#include "inf.hpp" +#include "format_types.hpp" +#include +//////////////////////////////////////////////////////////////////////////////// + +namespace stlplus +{ + + //////////////////////////////////////////////////////////////////////////////// + + // conversion TO string + std::string inf_to_string(const inf&, + unsigned radix = 10, + radix_display_t display = radix_c_style_or_hash, + unsigned width = 0) + throw(std::invalid_argument); + + // conversion FROM string + inf string_to_inf(const std::string&, + unsigned radix = 0) + throw(std::invalid_argument); + +//////////////////////////////////////////////////////////////////////////////// +} // end namespace stlplus +#endif