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

Function isNumeric

sdk/go/parser/markdown.go:176–186  ·  view source on GitHub ↗

isNumeric returns true if s is non-empty and all characters are digits.

(s string)

Source from the content-addressed store, hash-verified

174
175// isNumeric returns true if s is non-empty and all characters are digits.
176func isNumeric(s string) bool {
177 if len(s) == 0 {
178 return false
179 }
180 for _, c := range s {
181 if c < '0' || c > '9' {
182 return false
183 }
184 }
185 return true
186}
187
188// isAlpha returns true if s is non-empty and all characters are lowercase letters.
189func isAlpha(s string) bool {

Callers 2

splitFilenameIDFunction · 0.85
TestIsNumericFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestIsNumericFunction · 0.68