Lines Matching defs:string
73 /// See above (the only difference is that they key is provided as a string literal)
83 /// See above (the only difference is that they key is provided as a string literal)
315 inline std::string error_string();
337 /// error variables (but the `.what()` string is still available).
894 if (!m_ptr) pybind11_fail("Could not allocate string object!");
897 // 'explicit' is explicitly omitted from the following constructors to allow implicit conversion to py::str from C++ string-like objects
900 if (!m_ptr) pybind11_fail("Could not allocate string object!");
903 str(const std::string &s) : str(s.data(), s.size()) { }
908 Return a string representation of the object. This is analogous to
913 operator std::string() const {
918 pybind11_fail("Unable to extract string contents! (encoding issue)");
923 pybind11_fail("Unable to extract string contents! (invalid type)");
924 return std::string(buffer, (size_t) length);
933 /// Return string representation -- always returns a new reference, even if already a str
971 bytes(const std::string &s) : bytes(s.data(), s.size()) { }
975 operator std::string() const {
980 return std::string(buffer, (size_t) length);
989 pybind11_fail("Unable to extract string contents! (encoding issue)");
994 pybind11_fail("Unable to extract string contents! (invalid type)");
1008 pybind11_fail("Could not allocate string object!");