]> Dogcows Code - chaz/yoink/blob - src/stlplus/strings/string_pointer.tpp
build system enhancements
[chaz/yoink] / src / stlplus / strings / string_pointer.tpp
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>
10
11 namespace stlplus
12 {
13
14 template <typename T, typename S>
15 std::string pointer_to_string(const T* value,
16 S to_string_fn,
17 const std::string& null_string,
18 const std::string& prefix,
19 const std::string& suffix)
20 {
21 return value ? (prefix + to_string_fn(*value) + suffix) : null_string;
22 }
23
24 } // end namespace stlplus
This page took 0.032482 seconds and 4 git commands to generate.