MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / parser_isAnySizedReal

Function parser_isAnySizedReal

quest/src/core/parser.cpp:199–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197
198
199bool parser_isAnySizedReal(string str) {
200
201 // we assume that all strings which match the regex can be parsed by
202 // precisionAgnosticStringToFloat() above (once whitespace is removed)
203 // EXCEPT strings which contain a number too large to store in the qreal
204 // type (as is separately checked below). Note it is insufficient to merely
205 // duck-type using stold() et al because such functions permit non-numerical
206 // characters to follow the contained number which are silently removed (grr!)
207 smatch match;
208 return regex_match(str, match, regexes::real);
209}
210
211
212bool parser_isValidReal(string str) {

Callers 2

parser_isValidRealFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected