aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/utils/parse_double.h
blob: 61d1d940c96b23ce70c2c8a3602185547bd309d8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#pragma once

#include <util/generic/strbuf.h>

namespace NYql {

/*
These parse functions can understand nan, inf, -inf case-insensitively
They do not parse empty string to zero
*/

float FloatFromString(TStringBuf buf);
double DoubleFromString(TStringBuf buf);

bool TryFloatFromString(TStringBuf buf, float& value);
bool TryDoubleFromString(TStringBuf buf, double& value);

}