MCPcopy Create free account
hub / github.com/Restream/reindexer / validateObjectName

Function validateObjectName

cpp_src/tools/stringstools.cc:794–801  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

792}
793
794bool validateObjectName(std::string_view name, bool allowSpecialChars) noexcept {
795 if (!name.length()) {
796 return false;
797 }
798 return std::all_of(name.cbegin(), name.cend(), [allowSpecialChars](auto ch) {
799 return (std::isalnum(ch) || ch == '_' || ch == '-' || ch == '#' || (ch == '@' && allowSpecialChars));
800 });
801}
802
803bool validateUserNsName(std::string_view name) noexcept {
804 if (!name.length()) {

Callers 10

ConnectMethod · 0.85
AddNamespaceMethod · 0.85
addNamespaceMethod · 0.85
ConvertStorageMethod · 0.85
RepairStorageMethod · 0.85
repairNamespaceMethod · 0.85
dbmanager.ccFile · 0.85
OpenDatabaseMethod · 0.85
FromYAMLMethod · 0.85
FromJSONMethod · 0.85

Calls 3

lengthMethod · 0.80
cbeginMethod · 0.45
cendMethod · 0.45

Tested by

no test coverage detected