MCPcopy Create free account
hub / github.com/apple/foundationdb / validateField

Function validateField

flow/Trace.cpp:1642–1657  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1640}
1641
1642bool validateField(const char* key, bool allowUnderscores) {
1643 if ((key[0] < 'A' || key[0] > 'Z') && key[0] != '_') {
1644 return false;
1645 }
1646
1647 const char* underscore = strchr(key, '_');
1648 while (underscore) {
1649 if (!allowUnderscores || ((underscore[1] < 'A' || underscore[1] > 'Z') && key[0] != '_' && key[0] != '\0')) {
1650 return false;
1651 }
1652
1653 underscore = strchr(&underscore[1], '_');
1654 }
1655
1656 return true;
1657}
1658
1659void TraceEventFields::validateFormat() const {
1660 if (g_network && g_network->isSimulated()) {

Callers 1

validateFormatMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected