/ IsNum: check whether this string is all digits. */ /
| 60 | /* IsNum: check whether this string is all digits. */ |
| 61 | /***********************************************************************/ |
| 62 | bool IsNum(PSZ s) |
| 63 | { |
| 64 | char* p = s; |
| 65 | |
| 66 | if (*p == '-') |
| 67 | p++; |
| 68 | |
| 69 | if (*p == ']') |
| 70 | return false; |
| 71 | else for (; *p; p++) |
| 72 | if (*p == ']') |
| 73 | break; |
| 74 | else if (!isdigit(*p)) |
| 75 | return false; |
| 76 | |
| 77 | return true; |
| 78 | } // end of IsNum |
| 79 | |
| 80 | /***********************************************************************/ |
| 81 | /* IsArray: check whether this is a Mongo array path. */ |
no outgoing calls
no test coverage detected