MCPcopy Create free account
hub / github.com/asmuth/clip / isHexString

Method isHexString

src/utils/stringutil.cc:248–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246
247
248bool StringUtil::isHexString(const std::string& str) {
249 for (const auto& c : str) {
250 if ((c >= '0' && c <= '9') ||
251 (c >= 'a' && c <= 'f') ||
252 (c >= 'A' && c <= 'F')) {
253 continue;
254 }
255
256 return false;
257 }
258
259 return true;
260}
261
262bool StringUtil::isAlphanumeric(const std::string& str) {
263 for (const auto& c : str) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected