diff options
author | John Turner <jturner.usa@gmail.com> | 2025-09-14 00:16:10 -0400 |
---|---|---|
committer | John Turner <jturner.usa@gmail.com> | 2025-09-14 00:16:10 -0400 |
commit | efcea3a80da7c4479d5fe168435ecc9fd06bdc72 (patch) | |
tree | 5cb0177e17b1b00a177f2e830e809f606334571b /doc/reference/cstring_ref.adoc | |
download | sqlite-kv-bench-efcea3a80da7c4479d5fe168435ecc9fd06bdc72.tar.gz |
Squashed 'subprojects/boost-sqlite/' content from commit 3378e35
git-subtree-dir: subprojects/boost-sqlite
git-subtree-split: 3378e353705271e569cf4ba15c467b840a39798c
Diffstat (limited to 'doc/reference/cstring_ref.adoc')
-rw-r--r-- | doc/reference/cstring_ref.adoc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/reference/cstring_ref.adoc b/doc/reference/cstring_ref.adoc new file mode 100644 index 0000000..402663d --- /dev/null +++ b/doc/reference/cstring_ref.adoc @@ -0,0 +1,16 @@ +== `sqlite/cstring_ref.hpp` + +[#string_view] + +The `sqlite::string_view` class is a https://en.cppreference.com/w/cpp/string/basic_string_view[std::string_view] +compatible class. + +[#cstring_ref] + +The `cstring_ref` class is a view type similar to a `string_view`, but with a guarantee that it is null-terminated. + +It can be constructed from a raw `const char *` or any class that has a `c_str()` function returning a `const char *`. + +Otherwise it is similar to a `string_view`, except that `substr(std::size_t())` will return a `cstring_ref`, +whereas a `substr(std::size_t(), std::size_t())` returns a `string_view`. + |