A view of a str's UTF-8, or of a bytes-like buffer taken as UTF-8.
More...
#include <snicholls/core_adapters/nanobind/bytes.hpp>
|
| std::string_view | view () const noexcept |
| | The text.
|
| |
| std::size_t | size () const noexcept |
| | The length in bytes of UTF-8.
|
| |
| bool | acquire (PyObject *src) noexcept |
| | Takes src's UTF-8 or buffer (the type caster's step).
|
| |
A view of a str's UTF-8, or of a bytes-like buffer taken as UTF-8.
Definition at line 203 of file bytes.hpp.
◆ acquire()
| bool snicholls::python::text_view::acquire |
( |
PyObject * |
src | ) |
|
|
inlinenoexcept |
Takes src's UTF-8 or buffer (the type caster's step).
- Parameters
-
- Returns
- success.
Definition at line 212 of file bytes.hpp.
◆ size()
| std::size_t snicholls::python::text_view::size |
( |
| ) |
const |
|
inlinenoexcept |
The length in bytes of UTF-8.
- Returns
- the size.
Definition at line 209 of file bytes.hpp.
◆ view()
| std::string_view snicholls::python::text_view::view |
( |
| ) |
const |
|
inlinenoexcept |
The text.
- Returns
- a string_view valid while this view lives.
Definition at line 207 of file bytes.hpp.
The documentation for this class was generated from the following file: