MCPcopy Create free account
hub / github.com/catboost/catboost / GetStringLengthWithLimit

Function GetStringLengthWithLimit

util/generic/strbase.h:23–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21namespace NStringPrivate {
22 template <class TCharType>
23 size_t GetStringLengthWithLimit(const TCharType* s, size_t maxlen) {
24 Y_ASSERT(s);
25 size_t i = 0;
26 for (; i != maxlen && s[i]; ++i)
27 ;
28 return i;
29 }
30
31 inline size_t GetStringLengthWithLimit(const char* s, size_t maxlen) {
32 Y_ASSERT(s);

Callers 1

IsAbsolutePathFunction · 0.85

Calls 1

strnlenFunction · 0.85

Tested by

no test coverage detected