MCPcopy Create free account
hub / github.com/MariaDB/server / IsNum

Function IsNum

storage/connect/json.cpp:62–78  ·  view source on GitHub ↗

/ IsNum: check whether this string is all digits. */ /

Source from the content-addressed store, hash-verified

60/* IsNum: check whether this string is all digits. */
61/***********************************************************************/
62bool 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. */

Callers 15

GetTextMethod · 0.85
GetObjectTextMethod · 0.85
SetArrayOptionsMethod · 0.85
ParseJpathMethod · 0.85
FindRowMethod · 0.85
MakeTopTreeMethod · 0.85
SetArrayOptionsMethod · 0.85
ParseJpathMethod · 0.85
SetJsonValueMethod · 0.85
MakeDocumentMethod · 0.85
SetArrayOptionsMethod · 0.85
ParseJpathMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected