| 246 | //========================================================================== |
| 247 | |
| 248 | bool IsFloat (const char *str) |
| 249 | { |
| 250 | const char *pt; |
| 251 | |
| 252 | if (*str == '+' || *str == '-') |
| 253 | str++; |
| 254 | |
| 255 | if (*str == '.') |
| 256 | { |
| 257 | pt = str; |
| 258 | } |
| 259 | else |
| 260 | { |
| 261 | pt = CIsNum (str); |
| 262 | if (pt == NULL) |
| 263 | return false; |
| 264 | } |
| 265 | if (*pt == '.') |
| 266 | { |
| 267 | pt = CIsNum (pt+1); |
| 268 | if (pt == NULL) |
| 269 | return false; |
| 270 | } |
| 271 | if (*pt == 'e' || *pt == 'E') |
| 272 | { |
| 273 | pt++; |
| 274 | if (*pt == '+' || *pt == '-') |
| 275 | pt++; |
| 276 | pt = CIsNum (pt); |
| 277 | } |
| 278 | return pt != NULL && *pt == 0; |
| 279 | } |
| 280 | |
| 281 | //========================================================================== |
| 282 | // |
no test coverage detected