[ox/std] Add write(Writer_c, StringView)
This commit is contained in:
parent
b6ed919b01
commit
d17f536832
5
deps/ox/src/ox/std/stringview.hpp
vendored
5
deps/ox/src/ox/std/stringview.hpp
vendored
@ -17,6 +17,7 @@
|
|||||||
#include "strops.hpp"
|
#include "strops.hpp"
|
||||||
#include "types.hpp"
|
#include "types.hpp"
|
||||||
#include "vector.hpp"
|
#include "vector.hpp"
|
||||||
|
#include "writer.hpp"
|
||||||
|
|
||||||
namespace ox {
|
namespace ox {
|
||||||
|
|
||||||
@ -340,6 +341,10 @@ constexpr ox::Vector<ox::StringView, smallSz> split(CRStringView str, CRStringVi
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
constexpr auto write(Writer_c auto *writer, ox::CRStringView sv) noexcept {
|
||||||
|
return writer->write(sv.data(), sv.bytes());
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef OX_USE_STDLIB
|
#ifdef OX_USE_STDLIB
|
||||||
constexpr auto toStdStringView(CRStringView sv) noexcept {
|
constexpr auto toStdStringView(CRStringView sv) noexcept {
|
||||||
return std::string_view(sv.data(), sv.bytes());
|
return std::string_view(sv.data(), sv.bytes());
|
||||||
|
Loading…
Reference in New Issue
Block a user