MCPcopy Index your code
hub / github.com/Masterminds/structable / CompareStringPtr

Function CompareStringPtr

sqlite_ptr_test.go:29–38  ·  view source on GitHub ↗
(s1, s2 *string)

Source from the content-addressed store, hash-verified

27}
28
29func CompareStringPtr(s1, s2 *string) bool {
30 switch {
31 case s1 == nil && s2 == nil:
32 return true
33 case s1 != nil && s2 == nil || s1 == nil && s2 != nil:
34 return false
35 default:
36 return *s1 == *s2
37 }
38}
39
40func stringPtr(s string) *string {
41 return &s

Callers 4

equalsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected