[ox/std] Add String::append(StringView), cleanup
All checks were successful
Build / build (push) Successful in 2m30s
All checks were successful
Build / build (push) Successful in 2m30s
This commit is contained in:
parent
6a4b48221f
commit
18bb50626d
4
deps/ox/src/ox/std/fmt.hpp
vendored
4
deps/ox/src/ox/std/fmt.hpp
vendored
@ -195,9 +195,9 @@ constexpr StringType sfmt(StringView fmt, Args&&... args) noexcept {
|
||||
std::ignore = out.append(firstSegment.str, firstSegment.length);
|
||||
const detail::FmtArg elements[sizeof...(args)] = {args...};
|
||||
for (size_t i = 0; i < fmtSegments.size - 1; ++i) {
|
||||
std::ignore = out.append(elements[i].out.data(), elements[i].out.len());
|
||||
std::ignore = out.append(elements[i].out);
|
||||
const auto &s = fmtSegments.segments[i + 1];
|
||||
std::ignore = out.append(s.str, s.length);
|
||||
std::ignore = out.append(s.str);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
4
deps/ox/src/ox/std/string.hpp
vendored
4
deps/ox/src/ox/std/string.hpp
vendored
@ -178,6 +178,10 @@ class BasicString {
|
||||
return OxError(0);
|
||||
}
|
||||
|
||||
constexpr Error append(ox::StringView sv) noexcept {
|
||||
return append(sv.data(), sv.len());
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr BasicString substr(std::size_t pos) const noexcept;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user