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

Function ParseInt

util/string/cast.cpp:279–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277
278 template <typename T, typename TUnsigned, int base, typename TChar>
279 Y_NO_INLINE T ParseInt(const TChar* data, size_t len, const TBounds<TUnsigned>& bounds) {
280 T result;
281 const TChar* pos = data;
282 EParseStatus status = TIntParser<T, base, TChar>::Parse(&pos, pos + len, bounds, &result);
283
284 if (status == PS_OK) {
285 return result;
286 } else {
287 ThrowParseError(status, data, len, pos);
288 }
289 }
290
291 template <typename T, typename TUnsigned, int base, typename TChar>
292 Y_NO_INLINE bool TryParseInt(const TChar* data, size_t len, const TBounds<TUnsigned>& bounds, T* result) {

Callers

nothing calls this directly

Calls 2

ThrowParseErrorFunction · 0.85
ParseFunction · 0.50

Tested by

no test coverage detected