// Copyright (C) 2010, Guy Barrand. All rights reserved. // See the file tools.license for terms. #ifndef tools_b2s #define tools_b2s #include namespace tools { inline void b2s(bool a_value,std::string& a_s){ a_s = a_value?"true":"false"; } inline void bas(bool a_value,std::string& a_s){ a_s += (a_value?"true":"false"); } } #include namespace tools { inline void b2s(const std::vector& a_vals,std::string& a_s,const std::string& a_sep = "\n",bool a_sep_at_end = false) { a_s.clear(); size_t number = a_vals.size(); if(number<=0) return; number--; std::string stmp; for(size_t index=0;index