MCPcopy Create free account
hub / github.com/arun11299/cpp-jwt / substr

Method substr

include/jwt/string_view.hpp:205–214  ·  view source on GitHub ↗

NOTE: Does not throw

Source from the content-addressed store, hash-verified

203
204 // NOTE: Does not throw
205 basic_string_view substr(size_type pos, size_type n = npos) const noexcept
206 {
207 assert (pos < len_ && "Start position should be less than length of the view");
208 assert (n == npos ? 1 : (n - pos) < len_ &&
209 "Substring length asked for is more than the view length");
210
211 if (n == npos) n = len_;
212
213 return basic_string_view{data_ + pos, n};
214 }
215
216 /// Comparison Member Functions
217 int compare(const basic_string_view& other) const noexcept

Callers 2

str_operationsFunction · 0.80
splitFunction · 0.80

Calls

no outgoing calls

Tested by 1

str_operationsFunction · 0.64