MCPcopy Index your code
hub / github.com/git-bug/git-bug / SafeOneLine

Function SafeOneLine

util/text/validate.go:38–46  ·  view source on GitHub ↗

SafeOneLine will tell if a character in the string is considered unsafe Currently trigger on all unicode control character

(s string)

Source from the content-addressed store, hash-verified

36// SafeOneLine will tell if a character in the string is considered unsafe
37// Currently trigger on all unicode control character
38func SafeOneLine(s string) bool {
39 for _, r := range s {
40 if unicode.IsControl(r) {
41 return false
42 }
43 }
44
45 return true
46}
47
48// ValidUrl will tell if the string contains what seems to be a valid URL
49func ValidUrl(s string) bool {

Callers 5

ValidateMethod · 0.92
ValidateMethod · 0.92
ValidateMethod · 0.92
ValidateMethod · 0.92
ValidateMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected