MCPcopy Create free account
hub / github.com/coin-or/CppAD / is_number

Function is_number

example/general/stack_machine.cpp:32–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30// Begin empty namespace ------------------------------------------------
31
32bool is_number( const std::string &s )
33{ char ch = s[0];
34 bool number = (std::strchr("0123456789.", ch) != 0);
35 return number;
36}
37bool is_binary( const std::string &s )
38{ char ch = s[0];
39 bool binary = (strchr("+-*/.", ch) != 0);

Callers 1

StackMachineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected