MCPcopy Index your code
hub / github.com/OpenListTeam/OpenList / GetNoneEmpty

Function GetNoneEmpty

pkg/utils/str.go:35–42  ·  view source on GitHub ↗

GetNoneEmpty returns the first non-empty string, return empty if all empty

(strArr ...string)

Source from the content-addressed store, hash-verified

33
34// GetNoneEmpty returns the first non-empty string, return empty if all empty
35func GetNoneEmpty(strArr ...string) string {
36 for _, s := range strArr {
37 if len(s) > 0 {
38 return s
39 }
40 }
41 return ""
42}

Callers 1

InitMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected