MCPcopy Create free account
hub / github.com/buger/jsonparser / sameTree

Function sameTree

parser.go:513–526  ·  view source on GitHub ↗

SYS-REQ-008

(p1, p2 []string)

Source from the content-addressed store, hash-verified

511
512// SYS-REQ-008
513func sameTree(p1, p2 []string) bool {
514 minLen := len(p1)
515 if len(p2) < minLen {
516 minLen = len(p2)
517 }
518
519 for pi_1, p_1 := range p1[:minLen] {
520 if p2[pi_1] != p_1 {
521 return false
522 }
523 }
524
525 return true
526}
527
528const stackArraySize = 128
529

Callers 3

EachKeyFunction · 0.85
EachKeyErrFunction · 0.85

Calls

no outgoing calls

Tested by 1