Add /subdevice serial number lookup.

This commit is contained in:
stephb9959
2022-04-25 09:46:26 -07:00
parent 6c28f4ad7d
commit 6a6ed64505

View File

@@ -652,7 +652,8 @@ namespace OpenWifi::Utils {
[[nodiscard]] inline bool ValidUUID(const std::string &UUID) {
if(UUID.size()>36)
return false;
return (std::all_of(UUID.begin(),UUID.end(),[](auto i){return i=='-' || std::isxdigit(i);}));
uint dashes=0;
return (std::all_of(UUID.begin(),UUID.end(),[&](auto i){ if(i=='-') dashes++; return i=='-' || std::isxdigit(i);})) && (dashes>0);
}
[[nodiscard]] inline std::vector<std::string> Split(const std::string &List, char Delimiter=',' ) {