MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / isUUID

Function isUUID

test/test_uuid.c:13–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11#include <stdio.h>
12
13int isUUID(char* p, int upper) {
14 char* p1 = p;
15 do {
16 if (!(isxdigit(*p1) || (*p1 == '-')) || (upper && islower(*p1)) || (!upper && isupper(*p1))) {
17 return 0;
18 } else {
19 }
20 } while (*++p1 != 0);
21
22 if ((p[8] == '-') && (p[13] == '-') && (p[18] == '-') && (p[23] == '-')) {
23 return 1;
24 } else {
25 return 0;
26 }
27}
28
29int main() {
30 uuid_t uuid;

Callers 1

mainFunction · 0.85

Calls 3

isxdigitFunction · 0.85
islowerFunction · 0.50
isupperFunction · 0.50

Tested by

no test coverage detected