MCPcopy Create free account
hub / github.com/cogentcore/core / SafeString

Function SafeString

vgpu/strings.go:32–40  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

30var endChar byte = '\x00'
31
32func SafeString(s string) string {
33 if len(s) == 0 {
34 return end
35 }
36 if s[len(s)-1] != endChar {
37 return s + end
38 }
39 return s
40}
41
42func SafeStrings(list []string) []string {
43 for i := range list {

Callers 4

ConfigMethod · 0.85
CheckExistingFunction · 0.85
SafeStringsFunction · 0.85
CleanStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected