//--------------------------------------------------------------------------- // ŠNikolai V. Shokhirev, 2004-2008 <nikolai@shokhirev.com> http://www.shokhirev.com/nikolai.html // Reduced demo version //--------------------------------------------------------------------------- #include "StringUtils.h" //--------------------------------------------------------------------------- string BoolToStr(const bool& b) { if (b) return "true"; else return "false"; } string ComplexToStr(Complex c) { string s = ToString(c.Re); if (c.Im > 0.0) s += "+i*" + ToString(abs(c.Im)); else if (c.Im < 0.0) s += "-i*" + ToString(abs(c.Im)); return s; } // StringUtils