MCPcopy Create free account
hub / github.com/driangle/taskmd / isHexString

Function isHexString

sdk/go/parser/markdown.go:250–257  ·  view source on GitHub ↗

isHexString returns true if every character in s is a lowercase hex digit (0-9, a-f).

(s string)

Source from the content-addressed store, hash-verified

248
249// isHexString returns true if every character in s is a lowercase hex digit (0-9, a-f).
250func isHexString(s string) bool {
251 for _, c := range s {
252 if (c < '0' || c > '9') && (c < 'a' || c > 'f') {
253 return false
254 }
255 }
256 return len(s) > 0
257}
258
259// isAlphanumericID returns true if s is 3-8 lowercase alphanumeric chars with at least one digit.
260// This avoids false-positives on English words like "readme".

Callers 2

matchFullUUIDFunction · 0.70
isHexIDFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected