MCPcopy Create free account
hub / github.com/AdRoll/baker / isPrintable

Function isPrintable

output/sqlite.go:203–213  ·  view source on GitHub ↗

isPrintable reports whether a string contains only printable runes.

(str string)

Source from the content-addressed store, hash-verified

201
202// isPrintable reports whether a string contains only printable runes.
203func isPrintable(str string) bool {
204 const firstPrintable = 32 // ASCII space
205
206 for _, r := range str {
207 if r < firstPrintable || r > unicode.MaxASCII {
208 return false
209 }
210 }
211
212 return true
213}
214
215// vetIdentifiers checks all identifiers respect some rule so that we can use
216// them safely in queries.

Callers 1

vetIdentifiersMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected