MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / value_type

Function value_type

extlibs/vili/src/types.cpp:7–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5namespace vili
6{
7 node_type value_type(std::string_view value)
8 {
9 if (value == true_value || value == false_value)
10 return node_type::boolean;
11 if (value.at(0) == '"' && value.at(value.size() - 1) == '"')
12 return node_type::string;
13 if (utils::string::is_float(value.data()))
14 return node_type::number;
15 if (utils::string::is_int(value.data()))
16 return node_type::integer;
17 return {};
18 }
19
20 std::string to_string(node_type type)
21 {

Callers 2

add_associativeMethod · 0.50

Calls 5

is_floatFunction · 0.85
is_intFunction · 0.85
atMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected