X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fstlplus%2Fstrings%2Fstring_vector.cpp;fp=src%2Fstlplus%2Fstrings%2Fstring_vector.cpp;h=bee9b88e39d93b204a190c8fe919123f55adeaca;hb=6b0a0d0efafe34d48ab344fca3b479553bd4e62c;hp=0000000000000000000000000000000000000000;hpb=85783316365181491a3e3c0c63659972477cebba;p=chaz%2Fyoink diff --git a/src/stlplus/strings/string_vector.cpp b/src/stlplus/strings/string_vector.cpp new file mode 100644 index 0000000..bee9b88 --- /dev/null +++ b/src/stlplus/strings/string_vector.cpp @@ -0,0 +1,27 @@ +//////////////////////////////////////////////////////////////////////////////// + +// Author: Andy Rushton +// Copyright: (c) Southampton University 1999-2004 +// (c) Andy Rushton 2004-2009 +// License: BSD License, see ../docs/license.html + +//////////////////////////////////////////////////////////////////////////////// +#include "string_vector.hpp" + +namespace stlplus +{ + + //////////////////////////////////////////////////////////////////////////////// + // special case of vector + + std::string bool_vector_to_string(const std::vector& values) + { + std::string result; + for (size_t i = 0; i < values.size(); i++) + result.append(1, values[i] ? '1' : '0'); + return result; + } + + //////////////////////////////////////////////////////////////////////////////// + +} // end namespace stlplus