MCPcopy Create free account
hub / github.com/ada-url/ada / string_view substring

Method string_view substring

src/helpers.cpp:156–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156ada_really_inline constexpr std::string_view substring(std::string_view input,
157 size_t pos) {
158 ADA_ASSERT_TRUE(pos <= input.size());
159 // The following is safer but unneeded if we have the above line:
160 // return pos > input.size() ? std::string_view() : input.substr(pos);
161 return input.substr(pos);
162}
163
164ada_really_inline void resize(std::string_view& input, size_t pos) noexcept {
165 ADA_ASSERT_TRUE(pos <= input.size());

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected