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

Method off

util/generic/strbase.h:77–79  ·  view source on GitHub ↗

* @param Pointer to character inside the string, or nullptr. * @return Offset from string beginning (in chars), or npos on nullptr. */

Source from the content-addressed store, hash-verified

75 * @return Offset from string beginning (in chars), or npos on nullptr.
76 */
77 inline size_t off(const TCharType* ret) const noexcept {
78 return ret ? (size_t)(ret - Ptr()) : npos;
79 }
80
81 inline size_t IterOff(const_iterator it) const noexcept {
82 return begin() <= it && end() > it ? size_t(it - begin()) : npos;

Callers 2

cow_string.hFile · 0.80
string.hFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected