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

Method copy

include/jwt/string_view.hpp:192–202  ·  view source on GitHub ↗

NOTE: Does not throw

Source from the content-addressed store, hash-verified

190
191 // NOTE: Does not throw
192 size_type copy(CharT* dest, size_type n, size_type pos = 0) const noexcept
193 {
194 assert (pos < len_ && n < len_);
195 size_type to_copy = std::min(n, len_ - pos);
196
197 for (size_type i = 0; i < to_copy; i++) {
198 dest[i] = data_[i + pos];
199 }
200
201 return to_copy;
202 }
203
204 // NOTE: Does not throw
205 basic_string_view substr(size_type pos, size_type n = npos) const noexcept

Callers 1

str_operationsFunction · 0.80

Calls

no outgoing calls

Tested by 1

str_operationsFunction · 0.64