]> Dogcows Code - chaz/yoink/blob - src/stlplus/strings/string_vector.cpp
build system enhancements
[chaz/yoink] / src / stlplus / strings / string_vector.cpp
1 ////////////////////////////////////////////////////////////////////////////////
2
3 // Author: Andy Rushton
4 // Copyright: (c) Southampton University 1999-2004
5 // (c) Andy Rushton 2004-2009
6 // License: BSD License, see ../docs/license.html
7
8 ////////////////////////////////////////////////////////////////////////////////
9 #include "string_vector.hpp"
10
11 namespace stlplus
12 {
13
14 ////////////////////////////////////////////////////////////////////////////////
15 // special case of vector<bool>
16
17 std::string bool_vector_to_string(const std::vector<bool>& values)
18 {
19 std::string result;
20 for (size_t i = 0; i < values.size(); i++)
21 result.append(1, values[i] ? '1' : '0');
22 return result;
23 }
24
25 ////////////////////////////////////////////////////////////////////////////////
26
27 } // end namespace stlplus
This page took 0.032386 seconds and 4 git commands to generate.