MCPcopy Create free account
hub / github.com/dmlc/xgboost / substr

Method substr

include/xgboost/string_view.h:45–49  ·  view source on GitHub ↗

NOLINT

Source from the content-addressed store, hash-verified

43 [[nodiscard]] constexpr std::size_t size() const { return size_; } // NOLINT
44 [[nodiscard]] constexpr bool empty() const { return size() == 0; } // NOLINT
45 [[nodiscard]] StringView substr(std::size_t beg, std::size_t n) const { // NOLINT
46 CHECK_LE(beg, size_);
47 std::size_t len = std::min(n, size_ - beg);
48 return {str_ + beg, len};
49 }
50 [[nodiscard]] value_type const* c_str() const { return str_; } // NOLINT
51
52 [[nodiscard]] constexpr const_iterator cbegin() const { return str_; } // NOLINT

Callers 12

MakeDeviceOrdFunction · 0.80
GetHostAddressFunction · 0.80
CreateMetricImplFunction · 0.80
NameThreadFunction · 0.80
ErrorMethod · 0.80
PeekReadMethod · 0.80
SplitFunction · 0.80
TrimFirstFunction · 0.80
TrimLastFunction · 0.80
CreateTreeGeneratorFunction · 0.80
TESTFunction · 0.80
TESTFunction · 0.80

Calls

no outgoing calls

Tested by 2

TESTFunction · 0.64
TESTFunction · 0.64