diff --git a/doc/news.html b/doc/news.html index a3344e34..3b38951a 100644 --- a/doc/news.html +++ b/doc/news.html @@ -29,6 +29,20 @@
str'\0') characters.
+
+ operator()); see the make_function
+ docs for more info.properties unit tests contributed by Exposes the string
methods of Python's built-in str type. The
- semantics of the constructors and member functions defined below
- can be fully understood by reading the TypeWrapper concept
definition. Since str is publicly derived from
object, the
@@ -85,7 +87,10 @@ namespace boost { namespace python
public:
str(); // new str
- str(const char* s); // new str
+ str(char const* s); // new str
+
+ str(char const* start, char const* finish); // new str
+ str(char const* start, std::size_t length); // new str
template <class T>
explicit str(T const& other);
diff --git a/include/boost/python/str.hpp b/include/boost/python/str.hpp
index 6fc20f9d..024712f1 100644
--- a/include/boost/python/str.hpp
+++ b/include/boost/python/str.hpp
@@ -126,6 +126,11 @@ namespace detail
str_base(); // new str
str_base(const char* s); // new str
+
+ str_base(char const* start, char const* finish);
+
+ str_base(char const* start, std::size_t length);
+
explicit str_base(object_cref other);
BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS(str_base, object)
@@ -143,6 +148,14 @@ class str : public detail::str_base
str(const char* s) : base(s) {} // new str
+ str(char const* start, char const* finish) // new str
+ : base(start, finish)
+ {}
+
+ str(char const* start, std::size_t length) // new str
+ : base(start, length)
+ {}
+
template