| 197 | |
| 198 | |
| 199 | bool 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 | |
| 212 | bool parser_isValidReal(string str) { |
no outgoing calls
no test coverage detected