//---------------------------------------------------------------------------
// ŠNikolai V. Shokhirev, 2004-2008  <nikolai@shokhirev.com> http://www.shokhirev.com/nikolai.html
// Reduced demo version
//---------------------------------------------------------------------------

#include "StringUtils.h"
#include <sstream>

//---------------------------------------------------------------------------

string BoolToStr(bool b)
{
    if (b)
        return "true";
    else
        return "false";
}

string ComplexToStr(Complex c)
{
    std:ostringstream oss;
    oss << c.Re;
    if (c.Im > 0.0)
        oss << "+i*" << abs(c.Im);
    else if (c.Im < 0.0)
        oss << "-i*" << abs(c.Im);
    return oss.str();
}
// StringUtils