- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for PrintTrie (0.1 sec)
-
src/strings/export_test.go
// license that can be found in the LICENSE file. package strings func (r *Replacer) Replacer() any { r.once.Do(r.buildOnce) return r.r } func (r *Replacer) PrintTrie() string { r.once.Do(r.buildOnce) gen := r.r.(*genericReplacer) return gen.printNode(&gen.root, 0) } func (r *genericReplacer) printNode(t *trieNode, depth int) (s string) { if t.priority > 0 { s += "+"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 1.1K bytes - Viewed (0) -
src/strings/replace_test.go
args[i*2] = key } got := NewReplacer(args...).PrintTrie() // Remove tabs from tc.out wantbuf := make([]byte, 0, len(tc.out)) for i := 0; i < len(tc.out); i++ { if tc.out[i] != '\t' { wantbuf = append(wantbuf, tc.out[i]) } } want := string(wantbuf) if got != want { t.Errorf("PrintTrie(%q)\ngot\n%swant\n%s", tc.in, got, want) } } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 24 22:53:05 UTC 2017 - 14.1K bytes - Viewed (0)