|
PMDK C++ bindings
1.11
This is the C++ bindings documentation for PMDK's libpmemobj.
|
Our partial std::string_view implementation. More...
#include <libpmemobj++/string_view.hpp>
Public Member Functions | |
| basic_string_view () noexcept | |
| Default constructor with empty data. | |
| basic_string_view (const CharT *data, size_type size) | |
| Constructor initialized by data and its size. More... | |
| basic_string_view (const std::basic_string< CharT, Traits > &s) | |
| Constructor initialized by the basic string s. More... | |
| basic_string_view (const CharT *data) | |
| Constructor initialized by data. More... | |
| const CharT * | data () const noexcept |
| Returns pointer to data stored in this pmem::obj::string_view. More... | |
| size_type | size () const noexcept |
| Returns count of characters stored in this pmem::obj::string_view data. More... | |
| const CharT & | operator[] (size_type p) const noexcept |
| Returns reference to a character at position. More... | |
| int | compare (const basic_string_view &other) const noexcept |
| Compares this string_view with other. More... | |
Our partial std::string_view implementation.
If C++17's std::string_view implementation is not available, this one is used to avoid unnecessary string copying.
|
inline |
Constructor initialized by data and its size.
| [in] | data | pointer to the C-like string to initialize with, it can contain null characters. |
| [in] | size | length of the given data. |
|
inline |
Constructor initialized by the basic string s.
| [in] | s | reference to the string to initialize with. |
|
inline |
Constructor initialized by data.
Size of the data will be set using Traits::length().
| [in] | data | pointer to C-like string (char *) to initialize with, it has to end with the terminating null character. |
|
inlinenoexcept |
Compares this string_view with other.
Works in the same way as std::basic_string::compare.
|
inlinenoexcept |
Returns pointer to data stored in this pmem::obj::string_view.
It may not contain the terminating null character.
|
inlinenoexcept |
Returns reference to a character at position.
| [in] | p | . |
|
inlinenoexcept |
Returns count of characters stored in this pmem::obj::string_view data.