MCPcopy Create free account
hub / github.com/MusicPlayerDaemon/MPD / IsValidName

Function IsValidName

src/command/FileCommands.cxx:80–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80[[gnu::pure]]
81static bool
82IsValidName(const std::string_view s) noexcept
83{
84 if (s.empty() || !IsAlphaASCII(s.front()))
85 return false;
86
87 return std::none_of(s.begin(), s.end(), [=](const auto &ch) {
88 return !IsAlphaASCII(ch) && ch != '_' && ch != '-';
89 });
90}
91
92[[gnu::pure]]
93static bool

Callers 1

OnPairMethod · 0.85

Calls 1

emptyMethod · 0.80

Tested by

no test coverage detected